1 Reply Latest reply on Jul 23, 2007 9:46 AM by FlashForumName

    > < etc

    FlashForumName
      For a little background, here is what I am dealing with. I have an input text box, which sends it's htmlText to a php script which then saves it in a mysql database. This all works just fine. The problem arises whenever I try to insert something like an image tag. ie: <img src='../whatever/image.jpg'>

      The text field seems to interpret the <, ', > with the special characters &lt; &apos; &gt; like it says are also supported in the help manual. The string is then stored in the database with these special characters which would be fine but when they are passed back to Flash later, flash prints the string as a literal instead of grabbing the picture.

      For example, say i wanted to insert the image called image.jpg

      The text field would pass the string &lt;img src=&apos;image.jpg&apos;&gt; to the database. The database would then pass this string back to the text field after being updated but the text field would then just show: <img src='image.jpg'> instead of actually loading the image.

      So, my question is: is there a way to get it to stop passing &gt; &lt; etc? I have tried to replace them upon reading in the string but it sees them at that point as a < > ' yet it still will not load the picture. Is there any way around all this? I hope that made sense! Thanks in advance.

      edit: I forgot to mention that this is all in AS 3.0
        • 1. Re: &amp;gt; &amp;lt; etc
          FlashForumName Level 1
          I eventually figured it out. The problem revolved around two things, relative addressing did not work and using split/join before sending the data ie:

          temp3 = text1.htmlText;
          temp3 = temp3.split("&lt;").join("\<");
          temp3 = temp3.split("&gt;").join("\>");
          temp3 = temp3.split("&apos;").join("\'");

          So, doing the split and typing out the entire address instead of ../whatever/image.jpg fixed the problem