That makes sense. Do a \n for each <TR> or <P> or <BR> and a \t for each TD. Then strip out any formatting tags like <u> or <strong>, etc.
That's exactly my issue. %descr% is the field I'm using for text. The utility class sounds easy enough. But then, how would you describe when to use text and when to use html? I don't think you can do %descr.text%, can you? Unless you create another field. --Aaron On Wed, May 6, 2009 at 5:29 PM, Tarus Balog <ta...@opennms.org> wrote: > > On May 6, 2009, at 12:30 AM, Aaron Paxson wrote: > >> I just finished my ticketer plugin for AdventNet. It's working great. >> However, when AdventNet gets the description of the ticket, it >> encodes all the HTML code. >> >> I.e. <td>stuff</td> turns into <td>stuff</td> >> >> Is there a way I can "trick" this in order to display HTML tags as >> they should be? >> >> -- > > I've been itching for a HTML to text utility class for some time. For > example, often I want to use %descr% in the text field of a notice, > but it will imbed the HTML. > > Preferably, it would remove most markup but add CR/LF for things like > <br /> and </p>. > > -T > > _______________________________________________________________________ > Tarus Balog, OpenNMS Maintainer Main: +1 919 533 0160 > The OpenNMS Group, Inc. Fax: +1 773 345 3645 > Email: ta...@opennms.org URL: http://www.opennms.org > PGP Key Fingerprint: 8945 8521 9771 FEC9 5481 512B FECA 11D2 FD82 B45C > > > ------------------------------------------------------------------------------ > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 > Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Please read the OpenNMS Mailing List FAQ: > http://www.opennms.org/index.php/Mailing_List_FAQ > > opennms-devel mailing list > > To *unsubscribe* or change your subscription options, see the bottom of this > page: > https://lists.sourceforge.net/lists/listinfo/opennms-devel > -- Aaron J. Paxson --------- aaron.pax...@gmail.com http://aaron.thepaxson5.org ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Please read the OpenNMS Mailing List FAQ: http://www.opennms.org/index.php/Mailing_List_FAQ opennms-devel mailing list To *unsubscribe* or change your subscription options, see the bottom of this page: https://lists.sourceforge.net/lists/listinfo/opennms-devel