tiff / wysihtml5

Open source rich text editor based on HTML5 and the progressive-enhancement approach. Uses a sophisticated security concept and aims to generate fully valid HTML5 markup by preventing unmaintainable tag soups and inline styles.
http://xing.github.com/wysihtml5/
MIT License
6.49k stars 1k forks source link

Stripping out html tags #403

Open jsd219 opened 11 years ago

jsd219 commented 11 years ago

Hi, I am having some issues with the wysihtml5 editor. When I open the editor, display the code and manually insert something like <span style="color:red;">hello</span>. I hit save, it saves perfectly to my db and when I view the text it displays perfectly. However, when I open the text back up in the editor to change it the entire span tag is gone.

reference from ticket: https://github.com/vitalets/x-editable/issues/282#issuecomment-20232054

Any help is greatly appreciated.

God bless jason

jsd219 commented 11 years ago

Anyone have any insite to this issue?

jsd219 commented 11 years ago

Struggling here. When I put <span class="wysiwyg-color-red">hello</span> the color is red but when I put <span style="color;red;">hello</span> the entire span tag gets removed. I need the ability to do the later.

Please help

God bless jason

jsd219 commented 11 years ago

Please anyone, I am desperate. I need the ability to have inline styles. Is there a way to allow this?

cverond commented 11 years ago

If I'm not wrong, you should work with parser_rules in order to allow the tags you need. If the rules available doesn't fit your need, you should fork and change the way the code work (eg. allowing functions to get invoked on tags).

aterg commented 10 years ago

Actually, I have the same problem here (currently working with on Laravel 4 project, issue as jsd219 had already explained). Any help appreciated! Thx in advance