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

mundanity’s picture

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

sersim’s picture

I hope you'll find a better solution.

mundanity’s picture

Version: 6.x-1.3 » 6.x-1.x-dev
Status: Needs review » Fixed

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

sersim’s picture

Thanks for your work. I'll test the new version soon.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.