While working on my task, I encountered an issue when using valid but unclosed HTML tags, such as <div>, in item names (items stored in a text column). Here’s what happens:
When I save an item with a name like <div>, Monday accepts it as-is, and the data gets stored.
However, upon refreshing the item-view that includes my application, the data returned by Monday (through monday.api from monday-sdk-js) seems to auto-correct itself by appending a closing tag, therefore appending </div> at the end of the string:
This modification makes the data no longer valid JSON, causing significant issues in my application.
Has anyone faced a similar issue or found a way to handle this? I’d also like to request that Monday consider addressing this behavior, as it is a big problem when dealing with user-generated content that includes HTML-like syntax.
Is there a way to recategorize this post to a “feature request” instead of “monday Apps & Developers” ? I want to know because I don’t want to write basically the same post again, which I believe is against the norms here on monday community. Please confirm before I make another similar post.
“We couldn’t add item, text can’t contain ‘<’ sign”
If however you add <div> as an item name, not only does it accept it silently, but appends </div> to make <div></div> (other html tags are also “autocompleted”):
Everything is probably connected to the sanitization mechanism, but I believe Michael’s issue is different from yours. He would like for the system not to create closing tags. You are seeing na issue when using as the name. We can take a look into that as well. Would you be able to please send us an email to support@monday.com so that the relevant team can take a look into it?