Prevent search from including javascript
-
First off, thanks for making a great plugin! I love the updated excerpt functions that actually show relevant text from the content.
Only issue I found is that searching for certain words that may come up in scripts will sometimes be included in the new excerpts in the search results.
For instance if I try to search “document” It will start showing “$(document).ready(function(){…}” in the search excerpt for some pages.
The site uses acf pro and has many custom acf blocks which have scripts. I just wanted to check if there was a quick fix I could do before separating out all the scripts and enqueue-ing them instead
Is there anyway to exclude all text within “<script></script>” tags from the queries?
I’m using a custom theme by the way and have full access to the files.
- The topic ‘Prevent search from including javascript’ is closed to new replies.