Banshee
the secure PHP framework

Forum

Problems with forum et al: Je suis désolé. Die Vög

Frank
29 january 2011, 14:05
Banshee version: 3.0
PHP version:
PHP 5.3.5 with Suhosin-Patch (cli) (built: Jan 10 2011 10:21:22)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
Webserver:
Hiawatha v7.4, cache, CommandChannel, IPv6, Monitor, SSL, URL toolkit, XSLT
Copyright (C) by Hugo Leisink <hugo@leisink.net>

Hallo Hugo!
First of all I have to say , your framework rocks!
Really I have tried and used other well known cms/blogging software. They are good in their own right, but your framework fits perfectly my needs. Clean, secure, elegant design and easily extendable . After only a few hours of customizing the views and models and controllers programming has nearly finished for my website, which I intend to put online next week.
You did a great job. I am no expert on Web-programming, but I could follow the broad logic without hassles.

When testing the guestbook/weblog/forum last night, I come accross a puzzling behavior.
Though German and French characters work flowlessly in pages, they seem to make problems in the mentioned modules.
Either they are displayed wrongly (as I have seen from wrong UTF8 - ISO8859-1 conversions in my own programmes) or if the text contains the German Character &szlig; (This is the HTML code, for reasons of not breaking the forum) this very forum would be broken with the error message

"DOMDocument::loadXML(): Input is not proper UTF-8, indicate encoding ! Bytes: 0x9F 0x3C 0x2F 0x63 in Entity, line: 71 in /SOME_PATHS/banshee/libraries/xml.php on line 250.
XSL Transformation error"

Fortunatley, one can delete the entry via CMS/login/delete actions

The next days I may have the time to dig deeper into the source code, but maybe the solutions is a missing byte or so and no hussle at all.

The Topic of this post is obviously displayed nicely in the Topic header.
(Translated into English) I am sorry. The birds are everywhere and sweet.
But the very same text in the comment body poses problems.
Now I write the text of the Topic exactly as I did in the Topic header and we see this:
Je suis désolé. Die Vögel sind überall und sü
(I missed the &szlig; for the stated reason)

Sorry, if this message is a bit longer as it may contain redundant information. I hope everybody who is interested got the picture.

Has anyone any ideas yet?

Greetings from sunny but cold Berlin
Thank you,
Frank
Frank
29 january 2011, 14:08
Opps..
Hm, now I am really puzzled. This post worked exactly as it schould.
I try the German &szlig;

Die süßen Vögel.

Frank
29 january 2011, 14:11
Ok.. not a Banshee problem then, is it not
Where is the root of the problem.
It is present both on my FreeBSD and debian server.
FreeBSD is all ISO8859-1 and the debian is all UTF8.

No offence,
Thanks again in advance
Frank
Hugo Leisink
29 january 2011, 19:32
In libraries/general.php, there is function called unescaped_output(). Inside that function, try replacing htmlentities() by htmlspecialchars().

If that doesn't work, try adding accept-charset="utf-8" to the <form> tag of the page that caused the problem.



P.S.
If your website is done and online, please let me know. I'd like to what other people make with my framework.
Frank
29 january 2011, 20:58
htmlspecialchars() works.
Thank you a lot for the quick response!

I will definately let you know when my site with banshee is online.
ETA is next Sunday.
Message preview

The following BB-codes are available in a message:

  • [b]Bold text[/b]
  • [center]Center text or imagen[/center]
  • [color=color name or #RGB code]Colored text[/color]
  • [i]Italic text[/i]
  • [img]Link to image[/img]
  • [right]Align text or image right[/right]
  • [s]Strike-through text[/s]
  • [size=pixelsize]Big or small text[/size]
  • [u]Underlined text[/u]
  • [url]Link to website[/url]
  • [url=link to website]Link text[/url]