Skip to Content
Menu
This question has been flagged
1 Reply
1756 Views

Good day everyone, 


How can I automatically remove the html tags on a text field with html widget on an exported xml file in odoo 10.



Thank you in advance. 

Avatar
Discard
Best Answer

Hi,

Try this


import re

html_text = "<p>This is <b>bold</b> and <i>italic</i> text.</p>"
clean_text = re.sub('<.*?>', '', html_text)


Hope it helps

Avatar
Discard
Related Posts Replies Views Activity
0
Dec 24
625
2
Oct 24
827
2
Jul 24
1126
1
Jul 24
765
1
Jul 24
967