Bug Twocents_XH with quotation marks, commas or parentheses

A place to report and discuss bugs - please mention CMSimple-version, server, platform and browser version
Post Reply
Celtarcs
Posts: 8
Joined: Fri Oct 30, 2009 3:50 pm

Bug Twocents_XH with quotation marks, commas or parentheses

Post by Celtarcs » Mon Sep 25, 2017 2:44 pm

Hello,

I use the Twocents_XH plugin, very good ! ;)
But there is a bug: Can not create comments when the name of page (only for level 2,3,4...) contains quotation marks, commas or parentheses.
No problem for the pages of Level 1.

Example:
Creating a Level 1 page with the name:
Example1 'Example1' (Example1)
Edit the page: Write the title (Header1) "Example1 'Example1' (Example1)", and the code

Code: Select all

{{{twocents ('example1')}}}
Creating a second page of level 2 with the name:
Example2 'Example2' (Example2)
Edit the second page: The title (Header1) "Example2 'Example2' (Example2)", and the code

Code: Select all

{{{twocents ('example2')}}}
Now the test:
- Test 1: Open the page "Example1 'Example1' (Example1)" in view mode and write a comment -> Result OK
- test 2: Opening the page "Example2 'Example2' (Example2)" in view mode and writing a comment -> Result KO
Failed, the home page show in the <div></div>

Can someone confirm my tests?

Again thanks to Christoph Becker for his plugin.

Sorry for my English.

Regards

cmb
Posts: 12717
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Bug Twocents_XH with quotation marks, commas or parentheses

Post by cmb » Tue Sep 26, 2017 12:37 pm

Celtarcs wrote:Can someone confirm my tests?
Yes, indeed there is a bug. A hackish workaround would be to replace this line with:

Code: Select all

        return "{$GLOBALS['su']}&" . preg_replace('/=(?=&|$)/', '', http_build_query($this->params, null, '&'));
A clean solution appears to be much more complex.
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

Celtarcs
Posts: 8
Joined: Fri Oct 30, 2009 3:50 pm

Re: Bug Twocents_XH with quotation marks, commas or parentheses

Post by Celtarcs » Wed Sep 27, 2017 10:28 am

Thank you very mush for your help.

I made the same change in the plugin Cryptographp_XH.

Regards.

cmb
Posts: 12717
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Bug Twocents_XH with quotation marks, commas or parentheses

Post by cmb » Wed Sep 27, 2017 9:25 pm

Celtarcs wrote:I made the same change in the plugin Cryptographp_XH.
Ah, fine! Some other plugins may be affected by this issue as well, see https://github.com/cmb69/twocents_xh/issues/48.
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

Celtarcs
Posts: 8
Joined: Fri Oct 30, 2009 3:50 pm

Re: Bug Twocents_XH with quotation marks, commas or parentheses

Post by Celtarcs » Thu Sep 28, 2017 8:31 am

Thank you again for your help ;) .

Post Reply