Bug 820006 - Code in comments is double escaped
Summary: Code in comments is double escaped
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Website
Version: 2.x
Hardware: Unspecified
OS: Unspecified
high
low
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-08 20:50 UTC by Emily Dirsh
Modified: 2015-11-02 00:29 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-25 18:27:20 UTC
Target Upstream Version:
Embargoed:


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

Description Emily Dirsh 2012-05-08 20:50:54 UTC
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 05:04:49 UTC
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 05:54:47 UTC
This problem still exist on stage-198.

Comment 3 Clayton Coleman 2012-06-21 17:45:04 UTC
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 17:49:45 UTC
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 05:40:19 UTC
(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.