2

I’m struggling with <form> and <script> tags being removed in WYGWAM.

When these tags are added via source in WYGWAM and saved they show up on the page but when you go back into edit the entry they do not show up in Source area.

I tried adding this suggested regex to the config file but it didn’t work: https://getsatisfaction.com/pixelandtonic/topics/wygwam_deleting_javascript_tags_in_content.

Other Regex examples found on Google didn't work either.

How can I allow <form> and <script> tags in a WYGWAM field?

3
  • @kiamlaluno - we prefer to keep the add-on name in the question title if the question applies to a specific add-on (even if it's tagged as well). This makes it more obvious what the question is about when browsing the question lists. Aug 11, 2013 at 20:41
  • If anyone is having issues with embedding Tweets to your entries, this will fix it.
    – ninjaroll
    Aug 27, 2013 at 0:59
  • @ninjaroll I converted your answer to a comment as it's more appropriate... glad my answer helped you!
    – Anna_MediaGirl
    Aug 27, 2013 at 14:56

1 Answer 1

6

These tags are stripped out of the editor view because the "Restrict Allowed HTML" setting is set to YES for that field's WYGWAM configuration. Changing this setting to NO fixes the issue.

Go to Add-Ons -> Modules -> Wygwam ->(your toolbar config) and set the "Restrict Allowed HTML" setting to 'no'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.