Elxis CMS Forum

Extensions => Components => Topic started by: balisto on February 10, 2009, 17:36:35

Title: Bubble bug?
Post by: balisto on February 10, 2009, 17:36:35

Hi, I just realized that there is a problem with bubble (at least with my 2 installations):
quotation marks ( " ) and inverted comma or apostrophes ( ' ) do not show up.
Example: Instead of the comment:

Quote
Let's try to be a "bit" nicer.

the output is

Quote
Lets try to be a bit nicer.
Title: Re: Bubble bug?
Post by: balisto on February 12, 2009, 22:34:27

Hi! Can anybody confirm having the same problems? Or am I the only one?

Chris
Title: Re: Bubble bug?
Post by: datahell on February 12, 2009, 22:54:41
It is not a bug. Bubbles does nt like html, quotes and other strange symbols so it filters them out.
Title: Re: Bubble bug?
Post by: balisto on February 12, 2009, 23:01:31

Hi,

hmmm.... Strange symbols...? It(')s just ordinary English  ;)
Title: Re: Bubble bug?
Post by: rentasite on February 12, 2009, 23:17:58

Hi,

hmmm.... Strange symbols...? It(')s just ordinary English  ;)

Yeap! Those are strange symbols.
Title: Re: Bubble bug?
Post by: balisto on February 12, 2009, 23:19:44
why?
Title: Re: Bubble bug?
Post by: datahell on February 12, 2009, 23:20:33
Sorry for my expression, I though it would be understandable. "Strange symbols" are special characters like these: #$%~`
Why? For security reasons.
Wait 1 minute to tell you how to remove this filter although I don't recommend this removal.
Title: Re: Bubble bug?
Post by: datahell on February 12, 2009, 23:25:28
Instructions on how to remove this limitation (on your own risk).

Open file components/com_bubbles/bubbles.php
Go to line 335.
You will find this:
$patterns = array('/\$/', '/\#/', '/\^/', '/\'/', '/\"/', '/\&/', '/\`/', '/\</', '/\>/', '/\*/', '/\|/', '/\\\/');
Remove any element you wish to pass the test from the pattern array.
For instance to remove the double and the single quotes make the $patterns as follows:
$patterns = array('/\$/', '/\#/', '/\^/', '/\&/', '/\`/', '/\</', '/\>/', '/\*/', '/\|/', '/\\\/');
Title: Re: Bubble bug?
Post by: balisto on February 12, 2009, 23:26:43
No, no. I got what you ment... I just don't understand why this ---> ("hello") and this ---> (it's) are considered as strange symbols. They are part of any language I know. French and English don't work without it!?
Title: Re: Bubble bug?
Post by: balisto on February 12, 2009, 23:27:42
ahhhhhhhhhhh........ great. will try that. thanx ;D
Title: Re: Bubble bug?
Post by: rentasite on February 12, 2009, 23:32:38
No, no. I got what you ment... I just don't understand why this ---> ("hello") and this ---> (it's) are considered as strange symbols. They are part of any language I know. French and English don't work without it!?

It's not a language related matter. But has to do with the CODE.
Title: Re: Bubble bug?
Post by: balisto on February 13, 2009, 20:36:12

@ datahell: It works fine for the single quotes. The output for double quotes is now it's html-code
Code: [Select]
&quot; But I don't mind. I think double quotes are dispensable in messages. So will re-disable them. The single quotes were important. From your point of view (by knowing that you don't recommend it) you think it's quite a big security issue (only registered users will be able to write messages)?

@ supernet: Sure. I see that it's a code problem. I was just wondering what a forum (even a light one like bubble) is made for if users can't write messages in their propper language  :D

Thanks for your support,
Chris
Title: Re: Bubble bug?
Post by: datahell on February 13, 2009, 20:53:42
No, it is not a security issue as mysql inserts automatically backslashes, but I always want to be sure in everything I develop that the application will be un-hackable under any circumstances.
double quotes are being converted to &quot; cause of the usage of the "htmlspecialchars" function a few lines bellow.
Title: Re: Bubble bug?
Post by: balisto on February 13, 2009, 20:57:08
I see. So I'm not too worried for now  ;D
Perhaps you can keep this issue in mind for future updates of bubble. Would be great to keep it "international"...

Cheers,
Chris
Title: Re: Bubble bug?
Post by: datahell on February 13, 2009, 21:16:46
Some day I want to upgrade bubbles but I don't find free time to do it. If anyone wants to take this project and create an improved version he has my permission and my help.
Title: Re: Bubble bug?
Post by: balisto on February 13, 2009, 21:19:31
I wish I could  >:( If you need any help on graphical issues you know that you can ask me  :D