User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 402,975 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,650 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 315 | Replies: 8 | Solved
Reply
Join Date: Dec 2006
Location: Damascus - Syria
Posts: 8
Reputation: rori is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
rori's Avatar
rori rori is offline Offline
Newbie Poster

text truncated after special characters

  #1  
Jul 11th, 2008
I have a flash website that is reading from php database with a control panel to change the content of the website by the owner.

My problem is that when i enter some characters like (,) (&)(") the text gets truncated and won't see the rest of the text after any character of those.

The php database is storing all text correctly, but when displaying it in flash its stopping when encountered with one of the characters...

How can I encode the characters before entering them in the database so that the flash wont get messed up?

I hope I'm clear. Thank you for your time.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2007
Location: Arkansas
Posts: 368
Reputation: buddylee17 will become famous soon enough buddylee17 will become famous soon enough 
Rep Power: 2
Solved Threads: 70
buddylee17's Avatar
buddylee17 buddylee17 is offline Offline
Posting Whiz

Re: text truncated after special characters

  #2  
Jul 11th, 2008
I believe you have to use url encoding to get Flash to read it. For example, %26 will be displayed as &. Here's the urlencode manual.
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 239
nav33n's Avatar
nav33n nav33n is offline Offline
Posting Sensei

Re: text truncated after special characters

  #3  
Jul 11th, 2008
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Nov 2007
Location: Arkansas
Posts: 368
Reputation: buddylee17 will become famous soon enough buddylee17 will become famous soon enough 
Rep Power: 2
Solved Threads: 70
buddylee17's Avatar
buddylee17 buddylee17 is offline Offline
Posting Whiz

Re: text truncated after special characters

  #4  
Jul 11th, 2008
Yeah, I tried using &amp; but it truncated the text. I don't believe Flash interprets html. I know the <br> tag gets displayed as plain text.
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 239
nav33n's Avatar
nav33n nav33n is offline Offline
Posting Sensei

Re: text truncated after special characters

  #5  
Jul 11th, 2008
Originally Posted by buddylee17 View Post
Yeah, I tried using &amp; but it truncated the text. I don't believe Flash interprets html. I know the <br> tag gets displayed as plain text.


Oh, I didn't know that. But there must be a work around..
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Nov 2007
Location: Arkansas
Posts: 368
Reputation: buddylee17 will become famous soon enough buddylee17 will become famous soon enough 
Rep Power: 2
Solved Threads: 70
buddylee17's Avatar
buddylee17 buddylee17 is offline Offline
Posting Whiz

Re: text truncated after special characters

  #6  
Jul 11th, 2008
Reply With Quote  
Join Date: Dec 2006
Location: Damascus - Syria
Posts: 8
Reputation: rori is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
rori's Avatar
rori rori is offline Offline
Newbie Poster

Re: text truncated after special characters

  #7  
Jul 11th, 2008
oh right thats what i was looking for.. thanks a lot i'll try it in a while and i'm sure its gona work.

Originally Posted by buddylee17 View Post
I believe you have to use url encoding to get Flash to read it. For example, %26 will be displayed as &. Here's the urlencode manual.
Reply With Quote  
Join Date: Dec 2006
Location: Damascus - Syria
Posts: 8
Reputation: rori is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
rori's Avatar
rori rori is offline Offline
Newbie Poster

Re: text truncated after special characters

  #8  
Jul 11th, 2008
oh yes flash does understand html tags, but you have to set the text property to dynamic or input and then click a button that looks like this: <> and if you mouse over it says "Render Text as HTML".
Originally Posted by buddylee17 View Post
Yeah, I tried using &amp; but it truncated the text. I don't believe Flash interprets html. I know the <br> tag gets displayed as plain text.
Reply With Quote  
Join Date: Nov 2007
Location: Arkansas
Posts: 368
Reputation: buddylee17 will become famous soon enough buddylee17 will become famous soon enough 
Rep Power: 2
Solved Threads: 70
buddylee17's Avatar
buddylee17 buddylee17 is offline Offline
Posting Whiz

Re: text truncated after special characters

  #9  
Jul 11th, 2008
Alright I stand corrected. I've never even noticed that button. It's so small!
oh yes flash does understand html tags, but you have to set the text property to dynamic or input and then click a button that looks like this: <> and if you mouse over it says "Render Text as HTML".
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 7:59 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC