Hi Mario,

One idea might be to use Javascript on the client side - that kind of thing is 
easy with jQuery:
$('#divwithhtml').text()

Although the normal docs don't include it, it seems freemarker does support 
regex in ?replace :
http://dev.enekoalonso.com/2009/04/03/regular-expressions-in-freemarker/

Regards from Vienna,

Richard

> -----Ursprüngliche Nachricht-----
> Von: [email protected] [mailto:user-list-owner@magnolia-
> cms.com] Im Auftrag von Mario Ammann (via Magnolia Forums)
> Gesendet: Freitag, 25. April 2014 09:14
> An: Magnolia User List
> Betreff: [magnolia-user] How to Remove HTML-Code (Tags, Entities)
> 
> I'm trying to remove all HTML-Tags/Entities in Freemarker by using
> replace/regex. The goal is to print a clean teaser-abstract-text.
> 
> [code][#assign text = text?replace("<[^>]*>", "", "r")]
> 
> ${text}[/code]
> 
> But, it's not working. Is there a mistake or are there other possibilities to
> clean-up html?
> 
> Any ideas?
> 
> --
> Context is everything: http://forum.magnolia-
> cms.com/forum/thread.html?threadId=6deeefc9-228e-4b3e-8696-
> c629f58259df
> 
> 
> ----------------------------------------------------------------
> For list details, see http://www.magnolia-cms.com/community/mailing-
> lists.html
> Alternatively, use our forums: http://forum.magnolia-cms.com/
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------



----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to