콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
2366 화면

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. 

아바타
취소
베스트 답변

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

아바타
취소
관련 게시물 답글 화면 활동
2
7월 25
504
0
12월 24
1108
2
10월 24
1214
2
7월 24
1613
1
7월 24
1190