Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
2364 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
jul 25
498
0
dic 24
1107
2
oct 24
1213
2
jul 24
1611
1
jul 24
1189