Page 1 of 1

proper encoding of special chars

Posted: Wed May 18, 2005 7:29 pm
by nils73
Actually I am running a German website and therefore need special characters (ä, ö, ü, etc.) to be encoded in HTML. While I am using XHTML 1.0 strict it does not allow special chars inside the source code without encoding, like > or inside the site content), or at least it doesn't with my version of CMSMS (0.10beta2). I would like to refer to Textpattern, which does convert special chars to HTML entities in a proper and valid way. Any suggestions?

Regards,
Nils

Re: proper encoding of special chars

Posted: Fri May 20, 2005 4:29 pm
by nils73
After a long journey through the code and endless testing (and some hints) I finally found the lines I needed to change.

Now - at least - special chars are being converted so that I get proper XHTML. Here is, what I did.

In file 'misc.functions.php' in directory 'libs' (starting from line 217 in version 0.10b) un-comment the following lines:

Code: Select all

// Strip slashes if not already done so. 

if ( get_magic_quotes_gpc() ) 
{ 
	$val = stripslashes($val); 
} 
You'll have to remove // in each line (without comment of course) and it will work like a charm. Well, actually I still get ä instead of ä --- but I can live with that.

Regards,
Nils