Fixed Edit Message html special characters

Jean-Baptiste

Well-known member
I have the same bug in Ubuntu 13, Chrome & Firefox, and on iPhone (Safari & Chrome).

If anyone could give me a tempory fix before the next release, if would be great, that's a really annoying bug on my forum.
 

Kier

XenForo developer
Staff member
Can you reproduce the problem here on XenForo.com? So far, I have been unable to.
 

Sheratan

Well-known member
I can reproduce this in my site (1.2 Beta 5)

Win 7 64-bit SP 1 Chrome 27.0.1453.116 m

But I can not reproduce in here (xenforo.com)
 

Brogan

XenForo moderator
Staff member
Long shot but what is the charset and collation of your DB?

I can't reproduce this on any of my local installs - clean install and upgrades.
 

MattW

Well-known member
utf8_general_ci

Have just tried on my local install as well on Ubuntu 13.04 and it's doing it on there also.

EDIT: Also tried on a localhost 1.2 Beta 1 running on my WAMP set up, and it's doing it on there.
 
Last edited:

Sheratan

Well-known member
collation: utf8_general_ci
engine: InnoDB
charset: utf8

-edit-
Upgraded from 1.1.5 > Beta 1 > Beta 3 > Beta 4 > Beta 5
 
Last edited:

Kier

XenForo developer
Staff member
utf8_general_ci

Have just tried on my local install as well on Ubuntu 13.04 and it's doing it on there also.

EDIT: Also tried on a localhost 1.2 Beta 1 running on my WAMP set up, and it's doing it on there.
Just to confirm, you see this happening with Beta *1*? I was in the process of trying to work out if it was something that changed between Beta 4 and 5, but I'll abandon that quest if you're sure you're seeing it with Beta 1.
 

MattW

Well-known member
Just to confirm, you see this happening with Beta *1*? I was in the process of trying to work out if it was something that changed between Beta 4 and 5, but I'll abandon that quest if you're sure you're seeing it with Beta 1.
Correct.

beta1.PNG beta2.PNG
 

Jean-Baptiste

Well-known member
That might be helpful, thanks.
I have the same problem on beta 5 (I directly upgraded from 1.1.4 to 1.2 beta 4 btw). Both ubuntu 13 localhost, and production server.

EDIT : Even with enableListeners to false (no addons).
EDIT2 : Same with default style & language.
 

Jean-Baptiste

Well-known member
When I have a look to the html of the overlay editor, we can see that it's allready being escaped, with htmlspecialchars I guess.

b63f583a0c1cf079be1a414b1fe57db0.png

It looks like it's then sending via a POST request to the full inline editor.

EDIT :

Message looks fine in DB :
94c1087647ffae16b4564da8417fe16a.png
 
Last edited:

Jean-Baptiste

Well-known member
In XenForo_ViewPublic_Helper_Editor, on line 80, if I change :
PHP:
$messageHtml = $bbCodeParser->render($message, array('lightBox' => false));
to :
PHP:
$messageHtml = $message;
I do not have the problem anymore. (that's not a fix, just for Kier).
 

Liam W

Well-known member
I have this error as well, Beta 5. On my live site, and my localhost install. Linux & Windows respectively.
 

Mike

XenForo developer
Staff member
This might be a PHP 5.4 "regression", though I think the behavior before might've actually been bugged. Based on this code, it doesn't look like we tried to convert single quote entities back but obviously it works on different PHP versions. 5.4 may have fixed this.

So the simple thing is to simple change the argument to say to convert single quotes, so fixed.
 
Top