U4-8853 - Double quotes in Razor/HTML in Source Code/RTE causing some code to be deleted

Created by Alex Nichells 12 Aug 2016, 15:26:14 Updated by Sebastiaan Janssen 13 Aug 2016, 10:22:36

I have an RTE field which contains some HTML, within this I am using some razor code which contains some double quotes inside an onclick event (which is itself delimited by double quotes). In Visual Studio this works fine but in Umbraco as soon as the content is submitted the RTE parser appears to assume the double quotes in the razor code are ending the onclick event contents and as such is deleting everything between the second double quote and the ending angle bracket. This is making the onclick event fail.

Is there a way to make the RTE parser 'ignore' the double quotes within the razor code and just treat them as part of the contents of the onclick?

TIA.

Comments

Sebastiaan Janssen 13 Aug 2016, 10:22:32

This is intended behavior. If you really want to do this (the RTE doesn't seem like the most appropriate place to add Razor code) then you might be able to alter the tinyMCE.config file to allow this.


Priority: Normal

Type: Bug

State: Closed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version:

Sprint:

Story Points:

Cycle: