[4081][2.0 RC2] 2 slashes before apostrophes in PMs with UTF-8

Started by MultiformeIngegno, November 14, 2009, 09:23:16 AM

Previous topic - Next topic

MultiformeIngegno

Hello! :)

I received many reports from my users that noticed that in private messages (not happens in posts!) all the apostrophes are preceded by 2 slashes (\)!
I've the RC2 (not happened before the upgrade) and UTF-8 char-set (don't know if it's related... but I think)! :(
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

MultiformeIngegno

I'm able to reproduce this only in Ubuntu 9.10... but some of my users say it occurs in Windows too (both Firefox and IE), here's a screenshot:
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Norv

Are there any errors in your error log?
Do you have mods installed?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

MultiformeIngegno

Quote from: Norv on November 14, 2009, 09:51:27 AM
Are there any errors in your error log?
Do you have mods installed?
No errors, only:

8: Undefined index: coppaType
File: /public_html/forum/Sources/ManageServer.php
Line: 1802

...but it's a confirmed RC2 bug...

For the MODs, I've SimplePortal 2.3.1, Aeva, Highslide Image Viewer and XML Sitemap... but it happened also BEFORE their installation...
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Norv

About coppaType error, you can do this: (ManageServer.php)
Code (find) Select

'value' => $config_var[0] == 'select' ? $modSettings[$config_var[1]] : (isset($modSettings[$config_var[1]]) ? htmlspecialchars($modSettings[$config_var[1]]) : (in_array($config_var[0], array('int', 'float')) ? 0 : '')),

Code (replace) Select

'value' => isset($modSettings[$config_var[1]]) ? ($config_var[0] == 'select' ? $modSettings[$config_var[1]] : htmlspecialchars($modSettings[$config_var[1]])) : (in_array($config_var[0], array('int', 'float')) ? 0 : ''),


It might clear up the error log and allow to notice easier if anything else comes up.

On another note, can you please explain, are you saying that users of a forum installed on Ubuntu, respectively of another forum installed on Windows (that is, that the server is on Ubuntu or on Windows), experience it, or the users themselves are using Ubuntu, or Windows, regardless of what the server is on?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

MultiformeIngegno

Quote from: Norv on November 14, 2009, 10:15:52 AM
On another note, can you please explain, are you saying that users of a forum installed on Ubuntu, respectively of another forum installed on Windows (that is, that the server is on Ubuntu or on Windows), experience it, or the users themselves are using Ubuntu, or Windows, regardless of what the server is on?
No it's only ONE forum, installed on Linux but I'm not the server admin... it's a simple hosting...
I was meaning that users themselves are using Win or Ubuntu... I've specified that 'cause first I thought it was only a problem with Ubuntu, then other users email-ed me noticing it in Windows too (both with IE and Firefox).
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

MultiformeIngegno

RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Skhilled

#7
There is a pm issue where you use an apostrophe in a word like"it's" and then "preview" the pm it will and an escape to it ( \ ) after sending it. But also every time that you preview it will add an extra escape to the pm.

You may have to view the sent pm to see this. Set your pm's to save then view the saved pm. You may have to preview the pm twice to see this.

This only works with PM's and not posts, to my knowledge.

b4pjoe

I'm having the same issue. Any fix available?

Norv

#9
Skhilled, joec88, can you please tell, is your forum UTF-8 ?


ETA:
Quote from: Skhilled on November 16, 2009, 09:54:42 AM
You may have to view the sent pm to see this. Set your pm's to save then view the saved pm. You may have to preview the pm twice to see this.

I still don't manage to reproduce this. In order to "preview" a sent PM, I have to "quote" it, I suppose that is what you do? If not, any information about it may help.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Norv

Quote from: lorenzone92 on November 14, 2009, 09:23:16 AM
I received many reports from my users that noticed that in private messages (not happens in posts!) all the apostrophes are preceded by 2 slashes (\)!
I've the RC2 (not happened before the upgrade) and UTF-8 char-set (don't know if it's related... but I think)! :(


Sorry for the delay. I tried, but I can't replicate this on an UTF-8 forum, RC2 public, newly installed, English-utf8.

Could you please eventually tell anything at all, that seems perhaps to relate the users to which it happens? Or it is to all?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

CrazyTech

#11
I'm noticing the same issue in both PM's and signatures, posting is fine. It's almost erratic, as with some it's single backslashes and with others it's double.

The only overlapping modification I have is the sitemap. I did convert from vBulletin, but these are new signatures and PM's.

I'm actually running ISO-8859-1, by the way.

Sorry to keep adding to this post, but it displays with the slashes when I go to read a PM or signature. The input and even the preview both work fine.

Norv

I wonder if there is something in common, some particular operation that made it happen, or rather, something common in the text of those signatures?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

CrazyTech

Check the DB collation. I checked mine out and it was in latin_swedish_ci - I corrected the collation to UTF-8 and setup UTF-8 in SMF as well by installing the language pack. That took care of it, I'll bet the case above is the same, it would explain things.

Norv

Good to know, thank you for sharing the information. Might be worth checking for other tables as well.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

MultiformeIngegno

RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Norv

lorenzone92: Please try looking at the Structure tab, and see what collation your tables have. Also, for each table, what collation columns have. (those who do have, only text-based columns)
I understand your SMF and SMF database are UTF-8. In case you find any which is not UTF-8, please tell. (some mods might make their own columns without considering SMF's charset, but those can be ignored safely I think).
I have no "fix" to recommend for now, as I don't fully understand why the data would be double escaped in this instance, but it might be worth trying to investigate whether you have some differently encoded column(s), for PMs or else. Normally, all SMF's tables and columns should share the same charset and collation, otherwise even database errors may occur.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

MultiformeIngegno

smf_approval_queue and smf_log_group_requests are latin1_swedish_ci, all others are utf8! :o
I've tried to "convert" 'em to utf8_general_ci, it says "query completed" but it's not true! They're always latin1!!

And it's strange 'cause my forum isn't swedish!!! :-\
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

b4pjoe

Quote from: Norv on November 30, 2009, 07:53:41 PM
Skhilled, joec88, can you please tell, is your forum UTF-8 ?

Yes.

Here is a screen shot of what I am seeing by copying and pasting your post. When quoted the first time it looks like this:

Quote from: Norv on November 30, 2009, 07:53:41 PM
Skhilled, joec88, can you please tell, is your forum UTF-8 ?


ETA:
Quote from: Skhilled on November 16, 2009, 09:54:42 AM
You may have to view the sent pm to see this. Set your pm's to save then view the saved pm. You may have to preview the pm twice to see this.

I still don't manage to reproduce this. In order to "preview" a sent PM, I have to "quote" it, I suppose that is what you do? If not, any information about it may help.

Eache subsequent time is is quoted or even previewed it adds another backslash before any apostrophe. Here is after the 2nd preview:

Quote from: Norv on November 30, 2009, 07:53:41 PM
Skhilled, joec88, can you please tell, is your forum UTF-8 ?


ETA:
Quote from: Skhilled on November 16, 2009, 09:54:42 AM
You may have to view the sent pm to see this. Set your pm\\'s to save then view the saved pm. You may have to preview the pm twice to see this.

I still don\\'t manage to reproduce this. In order to "preview" a sent PM, I have to "quote" it, I suppose that is what you do? If not, any information about it may help.

3rd preview:

Quote from: Norv on November 30, 2009, 07:53:41 PM
Skhilled, joec88, can you please tell, is your forum UTF-8 ?


ETA:
Quote from: Skhilled on November 16, 2009, 09:54:42 AM
You may have to view the sent pm to see this. Set your pm\\\'s to save then view the saved pm. You may have to preview the pm twice to see this.

I still don\\\'t manage to reproduce this. In order to "preview" a sent PM, I have to "quote" it, I suppose that is what you do? If not, any information about it may help.

As you can see it adds a backslash every time someone quotes it or if you hit the preview button. And it only does it on PM's. Not posts.

b4pjoe

Just to add...

My SMF tables are "utf8_general_ci" but it seems any mods that have created tables are all "utf8_unicode_ci" if that helps at all.

Advertisement: