J
jwcarlton
I have a site where I use a JavaScript function to let the user increase font sizes in preselected areas. Those areas are currently denoted with a <p></p>.
Recently, I've come across the issue where user-generated content may include a <div> </div>, which then breaks the <p> tag.
In retrospect, I don't really have very many tags that I can use that wouldnever be included in the user-generated content, so I'm giving thought to a custom HTML tag; something like <mydomain> </mydomain>, then apply the JavaScript function to that tag instead of <p> </p>.
My question is, if I went that route, would the <mydomain> tag be compatible on all of the modern browsers (meaning, the last year or two)? Or am I going to run in to issues of certain browsers totally ignoring all content between the open and close, or worse, throwing an error?
Recently, I've come across the issue where user-generated content may include a <div> </div>, which then breaks the <p> tag.
In retrospect, I don't really have very many tags that I can use that wouldnever be included in the user-generated content, so I'm giving thought to a custom HTML tag; something like <mydomain> </mydomain>, then apply the JavaScript function to that tag instead of <p> </p>.
My question is, if I went that route, would the <mydomain> tag be compatible on all of the modern browsers (meaning, the last year or two)? Or am I going to run in to issues of certain browsers totally ignoring all content between the open and close, or worse, throwing an error?