I have a database text field that I use to store YouTube embed code. However, when I try to update the record using a CActiveForm textArea the HTML embed code is lost. For example, if I enter the following only the ‘then some ordinary text’ is saved’:
I assume that this is because the input is being purified, but I cannot find out how to switch this off. Any help would be appreciated. For you info the input field is as follows:
Another solution would be that instead of inserting the whole code of the youtube video, you just insert the link which could be easily validated. On display, you include the link the appropriate HTML code. This way you don’t have to worry for future malicious code if you are not the one using the CMS… Just an idea