Username Password
Bookmark and Share

HTML filter macro

In response to djs' question if anybody had ever written a macro that can stip HTML from a template-variable.

Here it is: 

I use it in the recovery template like this:

<tmpl_if recoverMessage>^filter(<tmpl_var recoverMessage>);</tmpl_if>

I don't expect it to work well always, since macro's in general don't handle quotes well. I've not used or tested this macro in any other other way than above.  


process ( html, [filter] )

       I use this macro in the Password Recovery Template. Here the variable <tmpl_var recoverMessage> returns
       <ul><li><li> which produces empty bullets. The reason for this is that line 73 of Auth/ adds
       list-tags ($error .= ’<li>’.$i18n->get(3).’</li>’;) and line 727 of the same module too. ($self->recov‐
       erPassword(’<ul><li>’.$self->error.’</li></ul>’); The real solution would be to change Auth/ (In fact I now see this has happend.)

      This macro is in fact an interface to WebGUI::HTML::filter.

       The filter chosen is "all" from the following in HTML::filter: Choose from "all", "none", "macros",
       "javascript", or "most". Defaults to "most". "all" removes all HTML tags and macros; "none" removes no
       HTML tags; "javascript" removes all references to javacript and macros; "macros" removes all macros, but
       nothing else; and "most" removes all but simple formatting tags like bold and italics.

System RequirementsPlease be advised: this contribution was tested with something older than WebGUI 7.5. When this contribution was uploaded there was no field for the author to fill out regarding it's requirements.
LinksNo Support Offered
Statistics Downloads: 910
Views: 3546
Rating: 0
Updated: 10/18/2007
Keywords macros
NavigationBack to the Bazaar
© 2023 Plain Black Corporation | All Rights Reserved