BUG: CleanId function not working with MJML code
Question
This issue is about MJML code but I think this is more about grapesjs than grapesjs-mjml
There is a function that remove unnecessary IDs in src/code_manager/model/HtmlGenerator.js. This function is working well on HTML tags, but not on MJML tags.
What I found is
htmlOpts.attributes = (mod, attrs) => {
const { id } = attrs;
console.log(attrs) // this log will return all dom elements in HTML, not in MJML
if ( id && id[0] === 'i' && !mod.get('script') && idRules.indexOf(id) < 0 ) {
delete attrs.id;
}
return attrs;
};
Answers (1)
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3282
BUG: CleanId function not working with MJML code
CleanID is still not working for MJML code, even on latest version of grapesJS (0.16.41) It's related to this closed issue : https://github...
Issue #3832
BUG: The css classes are removed and the autogenerated ids for each html tags gets changed ( Example : ivj5m-2) after each reload
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link Not there De...
Issue #3596
BUG: Values are not escaped
GrapesJS code is open to XSS issues because values are inserted into DOM without escaping, e.g. https://github.com/artf/grapesjs/blob/dev/s...
Issue #407
Defining new markup language
Hi @artf, I want to define a new markup language like mjml to make design more easy and readable. I started with <error>tag as a POC. Write...
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.