Fix unescaping comment text in the diff viewer when the text is blank.

Review Request #3801 — Created Jan. 27, 2013 and submitted

Information

Review Board
release-1.7.x

Reviewers

Fix unescaping comment text in the diff viewer when the text is blank.

If the comment text was blank, we'd hit a failure when unescaping the
text. I believe this may have been a change in jquery when passing in an
empty string to html().

Now we only do the unescaping logic if the comment text is blank.

Ideally, this would use _.unescape, but we don't have a new enough
underscore.js yet.
Loaded a diff I had with a blank comment. Instead of an error and the
diffs not loading, I saw them load.
Description From Last Updated

Can you move the comment into the block?

daviddavid
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
      Ignored Files:
        reviewboard/static/rb/js/diffviewer.js
    
    
  2. 
      
david
  1. 
      
  2. reviewboard/static/rb/js/diffviewer.js (Diff revision 1)
     
     
     
     
     
    Can you move the comment into the block?
  3. 
      
chipx86
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
      Ignored Files:
        reviewboard/static/rb/js/diffviewer.js
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Loading...