1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Duplicate Phrase mark_forums_read and HTML in phrase text

Discussion in 'Resolved Bug Reports' started by Mouth, Nov 21, 2013.

  1. Mouth

    Mouth Well-Known Member

    If you place HTML into the phrase text for phrase mark_forums_read, eg.
    HTML:
    <i class="fa fa-check-circle"></i> Mark Forums Read
    and then within a forum click the 'Mark Forums Read' link to get the modal pop-up, the button title/text on this pop-up is 'borked' because it contains HTML ...
    Screen Shot 2013-11-21 at 11.15.44 pm.png
     
  2. Mouth

    Mouth Well-Known Member

    Same issue for the home phrase and the navigation ..
    Screen Shot 2013-11-21 at 11.26.24 pm.png
     
  3. Mike

    Mike XenForo Developer Staff Member

    This is roughly the same as this: http://xenforo.com/community/threads/tooltips-should-be-made-html-safe.57074/

    However, the cruxt of the issue is that phrases are not guaranteed to be ok to contain HTML. It's very context dependent. Even if the first example didn't break out, HTML wouldn't work. The rule of thumb I would follow: unless a phrase contains HTML, assume it shouldn't contain HTML. This would actually be quite a few phrases then. Phrases that are literally a phrase or a few words should almost definitely not contain HTML.
     
    Adam Howard likes this.
  4. Mouth

    Mouth Well-Known Member

    A reasonable rule of thumb, except that in most instances the phrases are used many times, and for the majority of appearances HTML works fine. It will only be a single appearance, such as the usage for button title as above, where the HTML doesn't work. If XF is allowing HTML for phrases, then I believe it should use HTML stripping if it's going to use that phrase where HTML cannot be used.
     

Share This Page