Fix loading plain text content after saving a field.

Review Request #6542 — Created Oct. 30, 2014 and submitted

Information

Review Board
release-2.0.x
c61ea6e...

Reviewers

When saving a field as plain text, the new field content would be
returned as HTML (through the use of force_text_type=html). This would
result in certain characters being encoded (which is also true when
loading the page initially). We then attempted to encode the text on
load again, leading to double-encoding.

We now turn off the second encoding when we render the text, preventing
this from happening.

Tested built-in and custom fields with a variety of content, including XSS
attempts, with text types set for markdown and for plain text.

I only ever saw proper rendered output, without anything improperly
rendered or executed.

reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/utils/linkifyUtils.js
        reviewboard/static/rb/js/utils/textUtils.js
        reviewboard/static/rb/js/views/reviewRequestEditorView.js
    
    
    
    Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/utils/linkifyUtils.js
        reviewboard/static/rb/js/utils/textUtils.js
        reviewboard/static/rb/js/views/reviewRequestEditorView.js
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to markdown-redesign (1157183)
Loading...