Javascript in results and Datafeedr

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 Ernest Marcinko 6 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5652
    apeks
    apeks
    Participant

    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
    Example Search Results Image

    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 6 years, 11 months ago by apeks apeks.
    #5660
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    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 :)


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.