PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Inline elements in the title (search result page)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Inline elements in the title (search result page)

    Hi folks!

    I am trying to get inline elements in the titles of my result page. The scan is on html files and the title tag is like this one:

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>This is my title <sup>333</sup> <b>bold text</b></title>
    </head>
    (...)

    My problem: the result page represents the inline tags as a plain text instead to interpret them as an html markup. The markup of <b> and <sup> is escaped:

    <a href="page_00003.htm?zoom_highlight=This+is+my+tit le">
    <span class="highlight">This</span> is <span class="highlight">my</span> <span class="highlight">title</span> &lt;sup&gt;333&lt;/sup&gt; &lt;b&gt;bold text&lt;/b&gt;
    </a>

    How can I get inline tags in my result page titles?

  • #2
    The answer is that you can't get inline tags in your results page. The behavior you are seeing is normal, including any markup inside the <title> tag is not consider valid HTML.

    See the spec, http://www.w3.org/TR/REC-html40/stru...l.html#h-7.4.2

    You can also verify this by running your page through W3C Markup Validation Service.

    Comment


    • #3
      Well,*the answer was*not unexpected * Is there*another option?*For example*-* take*the result item*from some different html-element?
      I saw that*this is possible*for PDF and for some other file formats.

      Any other*workaround would be*welcome too.

      Comment


      • #4
        I can't think of any solution except to use valid HTML, or customise our script.

        Comment

        Working...
        X