We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22851
    • 805 Posts
    The (x)html of the search results for some of the searches I have been trying is invalid. Spans are being inserted within the url of the href attribute of hyperlinks, which is breaking the page:
    <div class="ajaxSearch_resultExtract"><p>...ted of course). The new version is available here: <a target="_blank" href="file://obfuscated/obfuscated/obfuscated/<span class="ajaxSearch_highlight ajaxSearch_highlight1">word</span>/<span class="ajaxSearch_highlight ajaxSearch_highlight1">word</span>obfuscated/obfuscated/">\\obfuscated\obfuscated\obfuscated\<span class="ajaxSearch_highlight ajaxSearch_highlight1">word</span>\<span class="ajaxSearch_highlight ajaxSearch_highlight1">word</span>_LATEST\obfuscated\</a>.  New...</p></div>
    

    Any ideas how I can avoid this? Thanks.
      YAMS: Yet Another Multilingual Solution for MODx
      YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
      Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
      • 22851
      • 805 Posts
      I apologise. This is not an ajaxSearch bug and ajaxSearch is not inserting spans in (x)html attributes. I use a bbcode plugin that replaces markup like this: on all pages by (x)html markup. This plugin was working on the code AFTER ajaxSearch had formatted the search results, causing the problem.

      The simplest solution for me is to prevent the bbcode plugin from running on the search results page, which I have done and this works. I notice that I might be able to reapply my bbcode function using the stripOutput ajaxSearch snippet parameter if I want to keep the bbcode working. Ultimately, it tells me that I should be improving the quality and security of my bbcode plugin by ensuring any tags are stripped from the attributes.

      Cheers.
        YAMS: Yet Another Multilingual Solution for MODx
        YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
        Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.