• 
      

    Escaping text on hidden content dividers

    Review Request #4330 — Created July 15, 2013 and submitted

    Information

    Review Board

    Reviewers

    ReviewBoard shows you a certain amount of context around the changes. Above
    this you're provided with two options...
    
      [+] 1005 lines
      [+] public void titlesModified(List<Title> titlesAdd, List<String> titlesDelete,
    
    This is all fine and well, except in the case of content like that shown above.
    'Title' coincidently belongs to an html tag, and including it breaks the html
    parser for the page (as it would with '</script>' and a few other things). HTML
    escaping these lines to prevent this.
    
    The main visible result is that diff hunks beyond the first fail to load. In
    firebug you get the error of...
    
      Uncaught ReferenceError: setFileAttachmentComments is not defined
    
    This is probably the cause of...
    
      http://code.google.com/p/reviewboard/issues/detail?id=2612
    
    This is available in the divider_escape branch of my repository...
    
      https://github.com/atagar/ReviewBoard/commit/617f526af36d320910626eac6872714734c5d7dd
    Tested against a review with the above divider. It renders just fine and the page source shows that it is now escaped.
    reviewbot
    1. This is a review from Review Bot.
        Tool: PEP8 Style Checker
        Processed Files:
          reviewboard/diffviewer/templatetags/difftags.py
        Ignored Files:
      
      
    2. 
        
    reviewbot
    1. This is a review from Review Bot.
        Tool: Pyflakes
        Processed Files:
          reviewboard/diffviewer/templatetags/difftags.py
        Ignored Files:
      
      
    2. 
        
    chipx86
    1. Thanks! Pushed to release-1.6.x, 1.7.x and master.
    2. 
        
    AT
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-1.6.x, release-1.7.x and master.