Bug 820006

Summary: Code in comments is double escaped
Product: OKD Reporter: Emily Dirsh <edirsh>
Component: WebsiteAssignee: Fabiano Franz <ffranz>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: high    
Version: 2.xCC: ccoleman, crobson, rmillner, xtian, yquan, yujzhang
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-25 18:27:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Screenshot of character codes displaying in code snippet in forum comment none

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.