Bug 820006 - Code in comments is double escaped
Code in comments is double escaped
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Website (Show other bugs)
2.x
Unspecified Unspecified
high Severity low
: ---
: ---
Assigned To: Fabiano Franz
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-08 16:50 EDT by Emily Dirsh
Modified: 2015-11-01 19:29 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-25 14:27:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Screenshot of character codes displaying in code snippet in forum comment (106.52 KB, image/png)
2012-05-08 16:50 EDT, Emily Dirsh
no flags Details

  None (edit)
Description Emily Dirsh 2012-05-08 16:50:54 EDT
Created attachment 583072 [details]
Screenshot of character codes displaying in code snippet in forum comment

Description of problem:
Code snippets in comments on the community site are double escaped, so escaped characters are output as &amp;<char code>; and are displayed as &<char code>; instead of being output and displayed correctly. This is especially egregious in code snippets, since these special characters are often important to the code.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Write a comment in the community site
2. Add a code snippet with some special characters (like double quotes)
3. Preview
  
Actual results:
Special characters are displayed as character codes due to double escaping. (i.e. " => &quot;)

Expected results:
Special characters should only be escaped once and display correctly

Additional info:
See attached screenshot
Comment 1 Clayton Coleman 2012-05-09 01:04:49 EDT
Fabiano can you take a look at this?  Maybe overaggressive filter.  The markdown filter should be the default but maybe it got reverted (you have to configure it via the content type permissions).
Comment 2 yquan 2012-06-01 01:54:47 EDT
This problem still exist on stage-198.
Comment 3 Clayton Coleman 2012-06-21 13:45:04 EDT
I'm going to fix this by reswizzling all the default formats.  Summary:

Update default format to allow markdown and geshi, but tweak the order so that markdown doesn't get clobbered.

Make all default formats for everyone everywhere use the default format.
Comment 4 Clayton Coleman 2012-06-21 13:49:45 EDT
Test in stage please, creating comments in the default format.  If this passes test in stage i'll change it in production.

Also, non admins only have access to MediaWiki and default formats now.
Comment 5 Yujie Zhang 2012-06-25 01:40:19 EDT
(In reply to comment #4)
Tested this issue on stage today, it can pass the test, thanks.

Note You need to log in before you can comment on or make changes to this bug.