|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Pasting into TinyMCE
Not sure if this will turn out to be a client side issue (within TinyMCE) or if I need to do something special in PHP to fix this
I'm trying to copy an email, paste it into TinyMCE, and then submit it to a MySQL DB. Example email after being pasted into TinyMCE (source code according to TinyMCE's 'HTML' button): PHP Code:
PHP/MySQL code to insert into DB: PHP Code:
After running through this code, this is what is stored in the DB for the record in the comments column: PHP Code:
Any ideas on what the problem could be?
__________________
Sir, a desire of knowledge is the natural feeling of mankind; and every human being, whose mind is not debauched, will be willing to give all that he has to get knowledge. Last edited by jamestrowbridge : October 23rd, 2009 at 01:29 PM. |
|
#2
|
|||
|
|||
|
I hate how in order to trigger ideas, I have to post in a forum sometimes..
After some more testing, it looks like the & is messing things up, like when using because I'm using jquery ajax(), with the data line: PHP Code:
if the javascript variable 'notes' contains an &, it thinks it's starting a new variable. I'll have to look that up and then I'll post the fix when I find it, so far.. sorry for the pointless thread. |
|
#3
|
|||
|
|||
|
i believe you can use the javascript escape() to escape the string and convert characters like & to their %NN equivalent.
|
|
#4
|
|||
|
|||
|
AWESOME! Thank you Llama,
changed to: PHP Code:
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Pasting into TinyMCE |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|