View Single Post
Old 08-03-2021, 07:08 PM   #10
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,228
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
After BR post, I decided giving a try to remove the HTML code, and it was not that difficult after all. Maybe not the cleanest way, but it worked here.

template:

Code:
program:
	re(field('comments'), '<.*?>|<\/.*?>', '')
This will simply delete every instance of HTML tags. And if you want to play safe, you can define those tags explicitly:

Code:
program:
	re(field('comments'), '<div.*?>|<\/div>|<p.*?>|<\/p>|<i.*?>|<\/i>|<b.*?>|<\/b>|<h.*?>|<\/h.*?>', '')
You can add other tags if you want, like <strong> or <em>.

P.S.: if you do not remove the tags, the formatted text can be visualized hovering the cell.

Last edited by thiago.eec; 08-03-2021 at 07:10 PM.
thiago.eec is online now   Reply With Quote