Remove HTML tags from WYSIWYG output

Post

Posted
Rating:
#3513 (In Topic #695)
Joe
I have a CPF that allows the use of Comcode, of which I'm trying to relay the contents of this field onto a comcode page.

The problem is, [html][/html] tags surround the input after using the WYSIWYG editor (assuming functions were used such as bold or underline). So when a member uses this editor to add info to this field, the HTML tags are rendered as text when relayed onto the comcode page.

I imagine I could just remove these tags from the output, but this would probably be a global change and interfere with output in other areas of the site where a member uses the WYSIWYG editor.

Is there a workaround?

The only other option I have is to drop comcode support for the CPF, but this will require the user to know basic HTML in order to use bold or linebreak tags.

Post

Posted
Rating:
#3515
I guess you're using the $CPF_VALUE symbol. I think you may be using * on it, which will escape it, making HTML display as code. Wrapping inside $COMCODE instead would parse Comcode in it. If in doubt please show your Tempcode here inside a code tag.

Post

Posted
Rating:
#3518
Joe

Chris Graham said

I guess you're using the $CPF_VALUE symbol. I think you may be using * on it, which will escape it, making HTML display as code. Wrapping inside $COMCODE instead would parse Comcode in it. If in doubt please show your Tempcode here inside a code tag.

1. I guess you're using the $CPF_VALUE symbol – That's correct.
2. I think you may be using * on it – Negative.
3. Wrapping inside $COMCODE instead – this worked! Thanks Chris! :)
0 guests and 0 members have recently viewed this.