It isn't a bug ... merely a quirk of the library

On 30/10/2012 18:36, Dante wrote:
Hi

Consider the following code:

  <cfset mytext="This is a test with <strong>strong</strong> words.">
  <cfdump var = #html(mytext).toString()#>

The result is:

  <html> <head></head> <body> This is a test with <strong>strong</strong> words. 
</body> </html>

The result must be :

  This is a test with <strong>strong</strong> words.

So, the html() function adds extra <html>, <head>, and <body> tags to the 
variable passed to it.

I think this is an expected behaviour of the JSoup library, but it seems 
strange on OpenBD.

As a workaround, after processing the JSoup Element, I use the following:

  #myhtmlvar.select("body").html()#

...to getting back the modified string without the extra elements.

I posted this message to the Issue Tracker, but I'm not convinced if it is a 
bug...

Dante
--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en

--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en

Reply via email to