Is it possible to search content of the wysiwyg editor fields for javascript or php code?

alindell's Avatar

alindell

08 Jan, 2015 04:15 PM

I'm trying to find pages that use a certain javascript function, and I don't know if it's searching the content as I'd expect or if it just doesn't exist. Is this possible?

  1. 1 Posted by alindell on 08 Jan, 2015 04:21 PM

    alindell's Avatar

    BTW... I should mention that the function being used would most likely be attached to a link inline (onclick="javascript"). So, I would expect to find it in the content of a template dataset, and not in another javascript file.

  2. 2 Posted by Wing Ming Chan on 08 Jan, 2015 05:51 PM

    Wing Ming Chan's Avatar

    Hi,

    If you are talking about searching page content in the DEFAULT region, will you consider web services? See Page and Lesson 5: Page for examples.

    Wing

  3. 3 Posted by Ryan Griffith on 08 Jan, 2015 09:23 PM

    Ryan Griffith's Avatar

    Hi,

    Currently, basic and advanced searching will only search content within tags, but not content within tag attributes (ie href, onclick, etc). I see we do have an improvement logged in our issue tracker to add this functionality to basic and advanced search.

    Feel free to use this link to track the progress of this issue or keep an eye out for it on our Release Notes site.

    In the meantime, the search and replace feature should return attribute content because it is implemented differently.

    Please let me know if you have any questions.

    Thanks!

  4. 4 Posted by alindell on 09 Jan, 2015 07:26 PM

    alindell's Avatar

    I tried the search and replace, and it did find the javascript file that contained the defined function. But, it didn't find any pages that contain it in a link. Maybe that proposed improvement will help if implemented.

    In the meantime, I've simply searched the web server for files containing it using grep.

    Thanks,
    Anders

  5. 5 Posted by Ryan Griffith on 14 Jan, 2015 03:12 PM

    Ryan Griffith's Avatar

    Thank you for following up, Anders. I am glad to hear you were able to find a viable workaround.

    Unfortunately, I do not have a timeline for the improvement, but definitely keep an eye on our Release Notes for the issue to be resolved.

    I'm going to go ahead and close this discussion, please feel free to comment or reply to re-open if you have any additional questions.

    Have a great day!

  6. Ryan Griffith closed this discussion on 14 Jan, 2015 03:12 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac