If i enter text into a new basic page, it is perfectly rendered in the normal drupal pages. When i view the single page, i get weird characters?
I attached 2 screenshots with the differents between the single page and the edit page of drupal.

Kind regards

CommentFileSizeAuthor
Screen single page403.58 KBgermaike mv
screen in edit376.99 KBgermaike mv

Comments

germaike mv’s picture

Find a solution for this problem :

Replace line 58-59 with:

      $document = phpQuery::newDocumentXHTML($content);
      $output .=  $document->find(variable_get('single_page_website_content', '#content .content'))->htmlOuter();

Now the text is rendered as XHTML and isn't giving anymore weird characters.

jamiehollern’s picture

When I try germaike mv's solution, I receive this error:

Exception: Error loading XML markup in DOMDocumentWrapper->loadMarkupXML() (line 424 of /sites/all/libraries/phpQuery/phpQuery-onefile.php).

Edit: I believe this is to do with a bug in PHPQuery.

jamiehollern’s picture

For some reason, on line 83 of single_page_website.module if you change return $output; to this return utf8_decode($output); it seems to partially work. The function changes the variable $output from UTF-8 to ISO-8859-1, but the output should work as UTF-8.

germaike mv’s picture

This also seems to work.
Thx

yaremchuk’s picture

Status: Fixed » Closed (fixed)

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