Yea that's strange. I have a variable called 'body' with the value of '<p><img alt="" src=" http://i617.photobucket.com/albums/tt257/jasonallen19/298220_801578543388_37707469_38160115_.jpg" style="width: 614px; height: 502px; " /></p>'
If I use the HtmlGetPrintableText function like this, I get [empty string] as value for TESTDIV <cfset TESTDIV = "#HtmlGetPrintabletext(body)#"> But if I use the left function as well, then I get something. <cfset TESTDIV = "#HtmlGetPrintabletext(left(body, 80))#"> yeilds <img alt="" src="http://i617.photobucket.com/albums/tt257/jasonallen19/298 Not sure what's going on here. On Wed, Nov 16, 2011 at 4:47 PM, Alex Skinner <[email protected]> wrote: > With the following test case > > <cfsavecontent variable="sHTMLFragment"> > > Hello World > > > <a href="www.google.com">www.google.com</a> > > > Another example > > </cfsavecontent> > > > <cfset doc=htmlgetprintabletext(sHTMLFragment)> > > > <cfdump var="#doc#"> > > > I get this > > Hello World www.google.com <www.google.com> Another example > > The <www.google.com> I wasn't expecting to see ? > > the cflib striphtml will definitely do what Jason wants just stripping the > tags and leaving the contents > > Thoughts ? > > Alex > > > On 16 November 2011 22:37, Alan Williamson (aw2.0 cloud experts) < > [email protected]> wrote: > >> http://openbd.org/manual/?/**function/htmlgetprintabletext<http://openbd.org/manual/?/function/htmlgetprintabletext> >> >> Look at this function .. it might get you where you need to go >> >> >> -- >> official tag/function reference: http://openbd.org/manual/ >> mailing list - >> http://groups.google.com/**group/openbd?hl=en<http://groups.google.com/group/openbd?hl=en> >> > > > > -- > Alex Skinner > Managing Director > Pixl8 Interactive > > Tel: +448452600726 > Email: [email protected] > Web: pixl8.co.uk > > -- > official tag/function reference: http://openbd.org/manual/ > mailing list - http://groups.google.com/group/openbd?hl=en > -- online documentation: http://openbd.org/manual/ google+ hints/tips: https://plus.google.com/115990347459711259462 http://groups.google.com/group/openbd?hl=en
