Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Javascript in results and Datafeedr
This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko 8 years, 1 month ago.
- AuthorPosts
- August 24, 2015 at 9:43 pm #5652
I am building a new site and have a couple of queries for you in relation to your plugin.
1. Javascript in results. – If I place a line of javascript (for example to show an image brought in by javascript) into the first lines of a post then when you conduct a search using the search bar then the the actual javascript code is shown in the search result
Is there a way I can avoid this in your search plugin?
2. Does your plugin support plugins such as Datafeedr so when a search is conducted it searches Datafeedr products contained in the database? (table name is dfr_shop_products)
Many thanks
Adrian-
This topic was modified 8 years, 1 month ago by
apeks.
August 25, 2015 at 10:12 am #5660Hi!
1. It’s happening because the PHP strip_tags() function returns the content between the tags. I’ve implemented a regex check to remove extra CSS and JS in case it finds any, but I think it only executes when the Run shortcodes found in post content option is enabled on the Advanced Options panel.
If that doesn’t work, let me know. In that case the only option is to make direct modifications to the search code. I will try to re-create the problem and suggest a change to force removing the script tags.2. It’s definitely not possible. Custom table search is always been on and off the table, but there are several yet unsolvable issues. The problem is not exactly the searching itself, but the processing of results – finding the proper image, getting the url to the result item etc.. These stuff are usually not stored in the database for any plugin and must be obtained with a function call, or instantiating an object – it differs for each and every plugin.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
-
This topic was modified 8 years, 1 month ago by
- AuthorPosts
You must be logged in to reply to this topic.