Hello,
I'm using Kendo Editor to handle the rich text content. We have a strange issue when the pasted html contains the attribute value with the keyword " on". Please find below the description.
- Copy the content from external source (I have copied form G Sheets). Please find below:
<span data-sheets-userformat="{"2":15037,"3":{"1":0},"5":{"1":[{"1":2,"2":0,"5":{"1":2,"2":0}},{"1":0,"2":0,"3":3},{"1":1,"2":0,"4":1}]},"6":{"1":[{"1":2,"2":0,"5":{"1":2,"2":0}},{"1":0,"2":0,"3":3},{"1":1,"2":0,"4":1}]},"7":{"1":[{"1":2,"2":0,"5":{"1":2,"2":0}},{"1":0,"2":0,"3":3},{"1":1,"2":0,"4":1}]},"8":{"1":[{"1":2,"2":0,"5":{"1":2,"2":0}},{"1":0,"2":0,"3":3},{"1":1,"2":0,"4":1}]},"10":2,"12":0,"14":{"1":2,"2":0},"15":"Calibri","16":11}" data-sheets-value="{"1":2,"2":"Just once"}" style="font-size:11pt;font-family:Calibri, Arial;">Just once</span><br />
- There is no issue while pasting the content. Pasted content displays properly.
- Save the form and load the data from database, there is the below issue in the browser console.
Uncaught DOMException: Failed to execute 'setAttribute' on 'Element': 'k-script-once"}"' is not a valid attribute name.
Problem appears to be in the function "_preventScriptExecution" and the statement : this.setAttribute('k-script-' + name, attribute.value);
Note: This issue happens ONLY when we have html and the attributes are having the keyword " on" (“space” followed by text “on”)
Example:
attribute="{"key":" on"}"
data-sheets-value="{"2":"Just once"}"
I have attached the sample screenshots and the html input data.
Could you please let me know if there is a fix for this issue?
Thanks in advance for your feedback.
Regards,
Puru