Hi, I have justed encountered some javascript errors when I have used Page names containing single quotes (').
On checking the code I found that the the names were being drawn from the Database without being formatted for special characters.
My case in particular concerned using a single quote (') in a page name. When this name was then listed by the 'listcontent.php' the page name containing it's single quote was echoed inside a javascript call delimited itself, by single quotes ( so causing the error ).
I have just used a Php addslashes( ) call for the references in that file as that was all that was affecting myself, but I think there are more cases where user entered field names are used without being formatted for special characters.
Cheers
Javascript errors with Special Characters in User entered field names
Re: Javascript errors with Special Characters in User entered field names
I just encountered that same problem...As I was entering my page names in French, I would get the same javascript error.
Problem is, because the french language uses the apostrophe ('), I cant tell editors not to use it in their menu text field.
Problem is, because the french language uses the apostrophe ('), I cant tell editors not to use it in their menu text field.
Last edited by joecannes on Wed Nov 26, 2008 2:00 am, edited 1 time in total.
Re: Javascript errors with Special Characters in User entered field names
This problem doesn't seem to occur here (CMS Made Simple 1.4.1 "Spring Garden").
Tested with a new page with "Title" and "Menu Text": Test 'a gogo
Regards,
D
Tested with a new page with "Title" and "Menu Text": Test 'a gogo
Regards,
D
Re: Javascript errors with Special Characters in User entered field names
I am using 1.4.1 as well, but converted to the MLE version...forgot to mention in IE 7..firefox 2 is fine
Last edited by joecannes on Wed Nov 26, 2008 2:11 am, edited 1 time in total.
Re: Javascript errors with Special Characters in User entered field names
Just figured it out what is going on.
The word I was having trouble with is: l'emplacement
If i typed in l'emplacement by hand, i was getting an error...but if I copied and pasted that word from a word document, the apostrophe comes out formatted as below:
l’emplacement
and it works then, no errors.
The word I was having trouble with is: l'emplacement
If i typed in l'emplacement by hand, i was getting an error...but if I copied and pasted that word from a word document, the apostrophe comes out formatted as below:
l’emplacement
and it works then, no errors.