Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Use htmlentities() instead of strip_tags() on the search results page

  • 29-09-2015 01:33AM
    #1
    Registered Users, Registered Users 2 Posts: 17,798 ✭✭✭✭


    Just noticed that when I posted a message consisting only of </thread> and a :D smiley, all that appeared in the search results for "all posts by me" was the letter D. The source of the page also showed only the letter D in that space.

    I suspect that this is because strip_tags() was used in this script as opposed to htmlentities(), such that special characters are omitted altogether from the result as opposed to being parsed into &lt, &gt etc.

    Not a massive bug at all, just something to look at. I'm more curious than anything else, as to whether my diagnosis of why this is happening is in fact why it's happening :p


Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.

Advertisement