Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bobi 280 posts 743 karma points
    Apr 09, 2017 @ 01:50
    Bobi
    0

    Possible bug when a colon is inserted in search box.

    Hi, I found an issue when a user inserts a colon : into the searchbox. The user receives:

    Error loading Partial View script (file: ~/Views/MacroPartials/ezSearch.cshtml)

  • Paul Wright (suedeapple) 264 posts 666 karma points
    Apr 09, 2017 @ 11:50
    Paul Wright (suedeapple)
    1

    "special characters" are known to make examine/lucene queries go a bit AWOL.

    Just have a simple function which weeds out the potential special characters (perhaps using a reg ex expression). before passing the text through ezSearch.

    A clue, would be to update this function :-)

        // Cleanse the search term
    public string CleanseSearchTerm(string input)
    {
        return Umbraco.StripHtml(input).ToString();
    }
    
  • Bobi 280 posts 743 karma points
    Apr 11, 2017 @ 03:08
    Bobi
    0

    Ok, thanks. I will check this out to see if I can prevent it from going AWOL :)

  • Bobi 280 posts 743 karma points
    Apr 25, 2017 @ 22:10
    Bobi
    0

    Hi,

    I wasn't able to figure it out. What can I add there to prevent search queries from breaking things when special characters are added?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies