proper encoding of special chars

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

proper encoding of special chars

Post 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
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

Re: proper encoding of special chars

Post 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
Post Reply

Return to “CMSMS Core”