My project manager discovered an interesting issue while I was gone. We are currently working on a project now for a site that uses a Flash application to browse content. The Flash SWF calls a CFC to get the content. The back end is our ColdFusion based CMS Element, which uses a rich text editor. The client was instructed that Flash does not understand all HTML tags, so they needed to keep things simple. That worked fine until the PM noticed something odd. Some sentences were running together. As an example:
Bush is a monkey.No, monkeys have more brains.
Turns out - the content was being pased in from another source like so:
Bush is a monkey. No, monkeys have more brains.
And Flash was ignoring the non-breaking space. Luckily enough it was easy enough to fix. I just added a method to my CFC to change the html entity to a normal space, which Flash respected.
As a related issue - the rich text editor was using liked to use the STRONG tag instead of B. Flash wants B, not STRONG. Luckily, the same method easily fixed that as well.
Archived Comments
Very common issues, youll run into this alot more with similar things with flash. We now made a subroutine (class) that cleans all our "flash" xhtml text and then, for lack of a better term, uncleans it for editing or for display in html.
we used a basic mix of str_replace in php and other good stuff to do this, now every entry on runtime gets this treatment depending on what the display type is.
cheers, good note.
Consulting The Book of Moock Appendix E pg. 995, the br tag is supported in textfields.
Odd.
On a similar note, I had to use ColdFusion(6.1 and 7) with a loadVars object (don't ask) recently, and discovered that even with whitespace management enabled, and the use of Trim/RTrim, there was still a space at the end of my string.
Is this a bug?
Doh! I just realized you said non-breaking space. My bad.
p.998 lists it as being supported, but only through the .htmlText property, not .text, even if the textfield is html enabled.