Fixed Search in resources section is sometimes returning results half screen like this...

Neutral Singh

Well-known member
Affected version
xF 2.x
No sure if it is already reported... Firefox 61.0.1 | MacOS High Sierra 10.13.2

Search in resources section is sometimes returning results half screen like this... I got the following screen at least thrice in one session...
Screen Shot 2018-07-13 at 11.15.07 PM.webp
 
This is happening when the search term appears inside a code block with other HTML elements. Code blocks don't seem to encode HTML symbols in the results page, which means when the textHighlight class is wrapped around the term, it breaks the rest of the page.

This is the HTML from the page source of a broken results page.

HTML:
<div class="contentRow-snippet">I have two help pages, one for <em class="textHighlight">Privacy</em> Policy and another called Terms and Rules. They are being listed twice on my help page, but with slightly different descriptions:


<li><a href="/help/<em class="textHighlight">privacy</em>" class="primaryContent"><em class="textHighlight">Privacy</em> Policy</a></li>
<li><a href="/help/tos"...</div>

            <div class="contentRow-minor contentRow-minor--hideLinks">
 
This is happening when the search term appears inside a code block with other HTML elements. Code blocks don't seem to encode HTML symbols in the results page, which means when the textHighlight class is wrapped around the term, it breaks the rest of the page.

I've experienced a related but less drastic 'endless bold' scenario, caused by matched search terms inside a code block.
XenForo-2-search-terms-highlighted---content-row---bold---code-block.webp

The HTML for the affected search result shows that XF1 template code is being inserted as HTML. The xen:foreach even has the textHighlight class added. (post)

XenForo-2-search-terms-highlighted---content-row---raw-HTML-all.webp
 
Top Bottom