Escape html
Question
Hello ! I noticed several faults in escaping html through grapesjs some of it can be fixed by this pull request https://github.com/artf/grapesjs/pull/676 , but I still having problems with the html inserted on start.
In the example bellow the first <pre> is not rendered properly and I need to double escape it like on the second <pre> to get it properly rendered and be able to import/export after that properly.
Somehow between the several transformations applied to the initial html it get screwed.
<div class="buttons">
<h1>Buttons</h1>
<a class="btn smooth btn-a">btn-a</a>
<br><br><pre><a class="btn btn-b smooth">btn-b</a></pre>
<br>
<a class="btn smooth btn-a btn-sm">btn-sm btn-a</a>
<br><br><pre>&lt;a class="btn btn-b btn-sm smooth"&gt;btn-sm&lt;/a&gt;</pre>
</div>
Answers (2)
As already mentioned here we have to create a new Component for <pre> as escaping everything it's not an option
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #980
[BUG] Related with task https://github.com/artf/grapesjs/issues/873
Hello, After restoring editor from db still have some part of bug present. It seems inside of script: function () traits will have old valu...
Issue #1214
Query for issue related to 873
Previous issue Please confirm, above reported bug has been resolved. Or still having same issue. Please confirm . Same issue with slider al...
Issue #1391
[BUG] Property slider view default unit
Hey @artf , thanks for the enhancement! The implementation works as expected with some properties (font-size, border-radius, ...), but not...
Issue #447
Multilanguage support: There is some static texts
Hi @artf, As you describe before in #26, multi language support is possible using configuration. But there is some static texts in the proj...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.