Re: [opennms-devel] Getting around HTML Encoding?
Johan Edstrom <[email protected]> Wed, 6 May 2009 16:36:24 -0600
| Newsgroups | gmane.network.opennms.bugs,gmane.network.opennms.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============4103701529270051999== Content-Type: multipart/alternative; boundary=Apple-Mail-27--798304161 --Apple-Mail-27--798304161 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Heh, for an over-engineered but funny solution :0 http://htmlparser.sourceforge.net/ -> XML Outputstream -> Xstream.parse -> Object, boom - you have a Pojo :) On May 6, 2009, at 4:29 PM, Tarus Balog 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: [email protected] 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 Johan Edstrom [email protected] They that can give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety. Benjamin Franklin, Historical Review of Pennsylvania, 1759 --Apple-Mail-27--798304161 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable <html><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = -webkit-line-break: after-white-space; ">Heh, for an over-engineered but = funny solution :0<div><br></div><div><a = href=3D"http://htmlparser.sourceforge.net/">http://htmlparser.sourceforge.= net/</a> -> XML Outputstream -> Xstream.parse -> Object, boom - you have = a Pojo :)</div><div><br></div><div><br><div><div>On May 6, 2009, at 4:29 = PM, Tarus Balog wrote:</div><br = class=3D"Apple-interchange-newline"><blockquote type=3D"cite"><div><br>On = May 6, 2009, at 12:30 AM, Aaron Paxson wrote:<br><br><blockquote = type=3D"cite">I just finished my ticketer plugin for AdventNet. = It's working great.<br></blockquote><blockquote = type=3D"cite">However, when AdventNet gets the description of the = ticket, it<br></blockquote><blockquote type=3D"cite">encodes all the = HTML code.<br></blockquote><blockquote = type=3D"cite"><br></blockquote><blockquote type=3D"cite">I.e. = <td>stuff</td> turns into = &lt;td&gt;stuff&lt;/td&gt;<br></blockquote><blockquote = type=3D"cite"><br></blockquote><blockquote type=3D"cite">Is there a way = I can "trick" this in order to display HTML tags = as<br></blockquote><blockquote type=3D"cite">they should = be?<br></blockquote><blockquote type=3D"cite"><br></blockquote><blockquote= type=3D"cite">-- <br></blockquote><br>I've been itching for a = HTML to text utility class for some time. For <br>example, often I = want to use %descr% in the text field of a notice, <br>but it will = imbed the HTML.<br><br>Preferably, it would remove most markup but add = CR/LF for things like <br><br /> and = </p>.<br><br>-T<br><br>________________________________________________= _______________________<br>Tarus Balog, OpenNMS Maintainer = Ma= in: +1 919 533 0160<br>The OpenNMS Group, Inc. = &n= bsp; Fax: +1 = 773 345 3645<br>Email: [email protected] = &n= bsp; URL: <a = href=3D"http://www.opennms.org">http://www.opennms.org</a><br>PGP Key = Fingerprint: 8945 8521 9771 FEC9 5481 512B FECA 11D2 FD82 = B45C<br><br><br>----------------------------------------------------------= --------------------<br>The NEW KODAK i700 Series Scanners deliver under = ANY circumstances! Your<br>production scanning environment may not be a = perfect world - but thanks to<br>Kodak, there's a perfect scanner to get = the job done! With the NEW KODAK i700<br>Series Scanner you'll get full = speed at 300 dpi even with all image <br>processing features enabled. <a = href=3D"http://p.sf.net/sfu/kodak-com">http://p.sf.net/sfu/kodak-com</a><b= r>_______________________________________________<br>Please read the = OpenNMS Mailing List FAQ:<br><a = href=3D"http://www.opennms.org/index.php/Mailing_List_FAQ">http://www.open= nms.org/index.php/Mailing_List_FAQ</a><br><br>opennms-devel mailing = list<br><br>To *unsubscribe* or change your subscription options, see = the bottom of this = page:<br>https://lists.sourceforge.net/lists/listinfo/opennms-devel<br></d= iv></blockquote></div><br><div apple-content-edited=3D"true"> <span = class=3D"Apple-style-span" style=3D"border-collapse: separate; color: = rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: = normal; font-variant: normal; font-weight: normal; letter-spacing: = normal; line-height: normal; orphans: 2; text-align: auto; text-indent: = 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: = 0px; -webkit-border-horizontal-spacing: 0px; = -webkit-border-vertical-spacing: 0px; = -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = auto; -webkit-text-stroke-width: 0; "><div style=3D"word-wrap: = break-word; -webkit-nbsp-mode: space; -webkit-line-break: = after-white-space; "><span class=3D"Apple-style-span" = style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = Helvetica; font-size: 12px; font-style: normal; font-variant: normal; = font-weight: normal; letter-spacing: normal; line-height: normal; = orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; = widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; = -webkit-border-vertical-spacing: 0px; = -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = auto; -webkit-text-stroke-width: 0px; "><div style=3D"word-wrap: = break-word; -webkit-nbsp-mode: space; -webkit-line-break: = after-white-space; "><span class=3D"Apple-style-span" = style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = Helvetica; font-size: 12px; font-style: normal; font-variant: normal; = font-weight: normal; letter-spacing: normal; line-height: normal; = orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; = widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; = -webkit-border-vertical-spacing: 0px; = -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = auto; -webkit-text-stroke-width: 0px; "><div style=3D"word-wrap: = break-word; -webkit-nbsp-mode: space; -webkit-line-break: = after-white-space; "><div>Johan Edstrom</div><div><br></div><div><a = href=3D"mailto:[email protected]">[email protected]</a></div><div><br></div>= <div><span class=3D"Apple-style-span" style=3D"font-family: Arial; = font-size: 13px; -webkit-border-horizontal-spacing: 5px; = -webkit-border-vertical-spacing: 5px; "><p style=3D"font-family: Arial, = Helvetica, sans-serif; font-size: 10pt; ">They that can give up = essential liberty to purchase a little temporary safety, deserve neither = liberty nor safety.</p><div align=3D"RIGHT">Benjamin Franklin, = Historical Review of Pennsylvania, = 1759</div></span></div><div><br></div></div></span><br = class=3D"Apple-interchange-newline"></div></span><br = class=3D"Apple-interchange-newline"></div></span><br = class=3D"Apple-interchange-newline"> </div><br></div></body></html>= --Apple-Mail-27--798304161-- --===============4103701529270051999== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ 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 --===============4103701529270051999== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============4103701529270051999==--