Javascript errors with Special Characters in User entered field names

A place to discuss the testing process in beta cycles or against SVN for the CMS Made Simple CORE package.
Locked
deepster
New Member
New Member
Posts: 4
Joined: Mon Mar 03, 2008 4:33 am

Javascript errors with Special Characters in User entered field names

Post by deepster »

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
joecannes
Forum Members
Forum Members
Posts: 93
Joined: Mon Nov 26, 2007 5:00 pm
Location: Montreal, Quebec

Re: Javascript errors with Special Characters in User entered field names

Post by joecannes »

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.
Last edited by joecannes on Wed Nov 26, 2008 2:00 am, edited 1 time in total.
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm
Location: the Netherlands

Re: Javascript errors with Special Characters in User entered field names

Post by Dee »

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
joecannes
Forum Members
Forum Members
Posts: 93
Joined: Mon Nov 26, 2007 5:00 pm
Location: Montreal, Quebec

Re: Javascript errors with Special Characters in User entered field names

Post by joecannes »

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.
joecannes
Forum Members
Forum Members
Posts: 93
Joined: Mon Nov 26, 2007 5:00 pm
Location: Montreal, Quebec

Re: Javascript errors with Special Characters in User entered field names

Post by joecannes »

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.
Locked

Return to “[locked] Quality Assurance”