Closed (fixed)
Project:
Pagination (Node)
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Feb 2009 at 19:32 UTC
Updated:
5 Mar 2009 at 09:50 UTC
When there are accented charachters in section titles, and a WYSIWYG module is used, the html entities are encoded twice, so the accented letters are displaced incorrectly.
I've fixed it changing the first if in the _header function as follows:
if ($op == 'set') {
// set a page title, use a placeholder if necessary ([ pagebreak ] used instead of [ header = TITLE ])
if ($key !== null) {
if (module_exists('fckeditor') || module_exists('tinytinymce') ||
module_exists('tinymce') || module_exists('htmlbox') || module_exists('jwysiwyg') ||
module_exists('yui_editor'))
$headers[$key] = trim($page);
else $headers[$key] = htmlspecialchars(trim($page) );
}
else {
if (module_exists('fckeditor') || module_exists('tinytinymce') ||
module_exists('tinymce') || module_exists('htmlbox') || module_exists('jwysiwyg') ||
module_exists('yui_editor'))
$headers[] = isset($page) ? trim($page) : '';
else $headers[] = isset($page) ? htmlspecialchars(trim($page) ) : '';
}
}
I think there should be a way to mark posts which have html entities encoded.
Comments
Comment #1
mundanity commentedHi Sersim,
Let me think about this for a bit longer, I'm not a big fan of disabling checks based on a module's existence. Due to permissions it's possible that a user with only plain text access would be able to submit unsafe characters. I know FCKEditor has an option to disable it's special chars checks, but would be nice if Pagination (Node) didn't have to rely on users to disable that.
Comment #2
sersim commentedI hope you'll find a better solution.
Comment #3
mundanity commentedHi Sersim,
I think I've found something that works. I'm using a regex to convert double encoded entities while building the ToC. It should capture the majority of all entities as far as I know. It's available in the 1.4 release.
Comment #4
sersim commentedThanks for your work. I'll test the new version soon.