Page 1 of 1

Get filelist-description valid?

Posted: Tue 1. Jan 2008, 20:32
by metti
Hello folks,
I have a problem with the Contentpart "filelist": I can't get the description valid (http://netzelf.de/downloads.phtml). When i fill in HTML-Specialchars they are replaced by the unencoded char when i save the CP.
Okay, no problem i thought: Then i'll use frontend_render to replace the chars with their HTML-equivalent.

Code: Select all

$special_decode = array("ä", "ö", "ü", "ß", "Ä", "Ö", "Ü");
$special_encode = array("ü", "ö", "ü", "&szlig", "Ä", "Ö", "Ü");
$content["all"] = str_replace($special_decode,$special_encode,$content["all"]);
But for a reason i don't know this does not work.

Has anybody a suggestion of how to get the description valid?

Re: Get filelist-description valid?

Posted: Tue 1. Jan 2008, 21:07
by update
Why do you think the description field doesn't put out valid code? Your example page is validating just fine - and I've been fiddling around with this CP just before... there seems to be no errors (V1351071205).

Re: Get filelist-description valid?

Posted: Tue 1. Jan 2008, 22:48
by metti
Hmmm. Maybe i should have done the validation before... But when i look into the generated sourcecode there are still ä and ü and such.
Strange

Re: Get filelist-description valid?

Posted: Tue 1. Jan 2008, 23:12
by update
but the browsers are switching to the right enconding - iso in your case. Only when set to non-automatic it could show some ugly letters...

Re: Get filelist-description valid?

Posted: Tue 1. Jan 2008, 23:31
by metti
Ahh. Think i understand now. Thank you