editable text webpart breaks source code upon save

kyle shapiro asked on January 7, 2016 18:28

Hello DevNet. Any time I check out my the page that contains my editable text webpart, the source code of the editable text webpart is changed by kentico and broken. <div><img src="{% (QueryString.target == "abc")?"abc":(QueryString.target == "xyz")?"xyz":"123" #%}" /></div> is changed to <div><img querystring.target="=" src="{% (QueryString.target == " /></div> one of the main issues I am seeing is that quotation marks are replaced with &quot ; I have already tried disabling all output filters. It seems to work in a static html webpart, but not in editable text webpart. Anybody have an idea of what kentico is doing? Why it leaves my source code alone sometimes, but breaks it other times? Thank you.

Correct Answer

Brenden Kehren answered on January 7, 2016 19:24

Then what I'd do is set some of the properties in the content before and the content after and simply let them add/edit content in the editable text area. The main problem is when you try to create dynamic links in the editable text areas, doesn't work very well.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Zach Perry answered on January 7, 2016 18:34

have you tried clicking the macro button "{#}" to enter macros, that usually will fix the issue.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on January 7, 2016 18:37

If you're using an editable text webpart for static text with macros, you're better off using a static text webpart and using the > to enter your macro text. Otherwise the CKEditor will "auto correct" your text. It's not a Kentico issue, it's standard functionality of the CKEditor.

3 votesVote for this answer Mark as a Correct answer

kyle shapiro answered on January 7, 2016 19:12

Ahh I see. I wasn't aware that CKEditor was something independent of kentico. Is there any way to edit the source code through kentico interface without passing through CKEditor? I prefer editable text webpart so that my content editors can have access to change simple text in most cases. I block access to the design view. The {#} button is a great trick, but in this instance I'm trying to place the macro inside of the src attribute of an image, so I need to be in that source view, which does not contain the {#} button. Thank you Zachary and Brenden.

0 votesVote for this answer Mark as a Correct answer

kyle shapiro answered on January 7, 2016 20:04

Alright, thanks Brenden.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.