• 
      

    Don't mark incoming rich text in replies as plain text.

    Review Request #6802 — Created Jan. 17, 2015 and submitted

    Information

    Review Board
    release-2.0.x
    eec0391...

    Reviewers

    When replying to a review and turning off Markdown, we'd make an API
    request to the server that, along with saving the text and rich text
    setting, we'd request that the text be converted back into HTML for
    display.
    
    However, when getting the response from the server, we'd ignore that we
    just forced rich text, and would set the rich text flag to that of the
    text that was saved. So, the rich text coming in would be marked as
    plain text. This caused the client to escape the HTML.
    
    Now the rich text flag reflects the text coming from the server and not
    the text being sent to the server.
    
    Unit tests have been updated to ensure that the resulting flag is
    correct in all cases.

    Unit tests pass.

    Wrote the string ' " < > & and sent as Markdown on a reply.
    Saw it came back correctly from the server.

    Then wrote the same string and sent as plain text. It no longer
    appeared escaped.

    reviewbot
    1. Tool: PEP8 Style Checker
      Ignored Files:
          reviewboard/static/rb/js/models/tests/reviewReplyEditorModelTests.js
          reviewboard/static/rb/js/models/reviewReplyEditorModel.js
      
      
      
      Tool: Pyflakes
      Ignored Files:
          reviewboard/static/rb/js/models/tests/reviewReplyEditorModelTests.js
          reviewboard/static/rb/js/models/reviewReplyEditorModel.js
      
      
    2. 
        
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.0.x (2716a88)