Forum OpenACS Development: Removing HTML tags from description output

I was browsing OpenACS website, trying to find a sample to benchmark how HTML tags are stripped from text paragraphs... boring... more boring...

Then, I found this piece of art!
https://openacs.org/forums/message-view?message_id=154003

Best wishes,

Collapse
Posted by Gustaf Neumann on
if you want to strip HTML tags, just use ns_striphtml. If you want to make a pretty text preserving links, images, etc.,
use ad_html_text_convert [2].

[1] https://naviserver.sourceforge.io/n/naviserver/files/ns_striphtml.html
[2] https://openacs.org/api-doc/proc-view?proc=ad_html_text_convert&source_p=1

Collapse
Posted by Iuri Sampaio on
I'm going to use both! ;)

1) To insert dynamic content within new meta tags in the HTML head.
then: ns_striphtml
2) To retrieve and display HTML source from i18n messages.
then ad_html_text_convert.

By the way, I think item 2. isn't the best approach to deal with templates to ad_proc [acs-mail-lite::send], is it?

Ex: acs-mail-lite::send ... -body [_ #evex-event.body_notf_lt]

How would I use the model/arch packages/custom-pkg/templates ?