[MAGNOLIA-1065] Backslash Gets Stripped from FCK Editor Fields Created: 20/Sep/06 Updated: 23/Jan/13 Resolved: 05/Oct/06 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 3.0 RC2 |
| Fix Version/s: | 3.0 RC3 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Sean McMains | Assignee: | Magnolia International |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Verified on Mac OS X and Linux running Derby and BDB |
||
| Attachments: |
|
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: |
| Description |
|
If one enteres text with a backslash ( \ ) into an FCK Editor field that text will display on the site fine. However, when you go to edit that paragraph next time, the backslashes will be removed from the FCK Editor field. If one saves at that point, the backslashes will also be removed from the site. |
| Comments |
| Comment by Sean McMains [ 26/Sep/06 ] |
|
This appears to be a problem with DialogFckEdit.escapeJsValue(), which doesn't attempt to escape the backslash character. For the content "I have a \ backslash", fckInstance.Value should be set to "I have a |
| Comment by Sean McMains [ 03/Oct/06 ] |
|
Further research shows that because the backslash isn't escaped properly, this bug can cause non-printable (and non-exportable) characters to be introduced into a page. For example: 1. Create a new paragraph with the "sample: editor" paragraph type. |
| Comment by Sean McMains [ 04/Oct/06 ] |
|
This patch fixes this problem by using the Apache Commons StringEscapeUtils package (which is already used elsewhere in Magnolia) to do the escaping, rather than custom search and replace code. |
| Comment by Magnolia International [ 05/Oct/06 ] |
|
Patch applied and tests added - thanks ! |