Forum Discussion

Warren_Brill's avatar
5 years ago

Closing H1 Tag Escaped on Khoros Platform?

In the source code for all of our pages is a line that is supposed to expose an H1 tag, but our SEO team states that their tools do not detect an H1 on the pages. I have reproduced a sample fragment from the source that propagates to our pages below.

"layout.module_welcome" : "<style>\r\n.announcement-text {margin:10px 0 0 18px;}\r\n<\/style>\r\n<div class=\"announcement-text\"><H1><font color=\"#000000\">[community name]<\/font><\/H1>\r\n<P><font size=\"+1\">[community description]<\/font><\/P>\r\n<\/div>",

Note the backslash in the closing H1 tag (" <\/H1>"). In my experience, a backslash in anything other than MS-DOS is an escape character, telling the interpreter to ignore what follows.

Does this mean that there is an unclosed H1 string? Would this explain why the tools don't detect an H1? Pardon my ignorance. 😉

  • MattV's avatar
    MattV
    Khoros Staff

    This looks like this is coming from JSON or JavaScript. So that's probably not the content exactly as it's getting output onto the page (it probably wouldn't have those backslashes). If that content IS getting output verbatim to HTML, then none of it would work because you also have other backslash escape issues; not just the H1 tag (which would reveal itself as a broken page, or at least that particular component being broken).