[MAGNOLIA-1593] Including a <script> in a rich editor paragraph renders that paragraph uneditable Created: 13/Jun/07  Updated: 04/Nov/15  Resolved: 04/Nov/15

Status: Closed
Project: Magnolia
Component/s: gui
Affects Version/s: 3.0.2, 3.5.4
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Sean McMains Assignee: Unassigned
Resolution: Won't Do Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File rich-editor-script-patch.txt    
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   

I add something like this to a rich editor paragraph using the Source view:

<script type="text/javascript">
alert("Hello there!");
</script>

When the page reloads, the alert displays correctly. However, when I go to edit that paragraph again, the browser mistakenly interprets the </script> in what I've entered as the end of the script block that configures FCKEditor, resulting in gibberish on the screen and no usable FCKEditor control.

This article details the solution:
http://www.wwco.com/~wls/blog/2007/04/25/using-script-in-a-javascript-literal/

I've implemented this for Magnolia's FCKEditor integration. Patch is included.



 Comments   
Comment by Sean McMains [ 20/Mar/08 ]

I've just verified that this problem still exists in 3.5.4. (Our 3.5 merge had wiped the fix out in our custom version of Magnolia, so it came to our attention again.)

Comment by Michael Mühlebach [ 04/Nov/15 ]

Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes.
Thanks for taking the time to raise this issue. As you are no doubt aware this issue has been on our backlog for some time now with very little movement.
I'm going to close this to set expectations so the issue doesn't stay open for years with few updates. If the issue is still relevant please feel free to reopen it or create a new issue.

Generated at Mon Feb 12 03:28:25 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.