Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
quote in title
#1
GS version 3.1B

Hello,
In the title of the menu, I have a name with quote :
exemple : My name is "madvic"

And the html code :
<a href="http://exemple.net/getsimple/index.php?id=exemple" title="My name is \madvic\ ">My name is "madvic"</a></li>

Thanks
Reply
#2
no one has the same problem with the beta ?
Reply
#3
try with this title
my name is \"madvic\"
Addons: blue business theme, Online Visitors, Notepad
Reply
#4
No, it does'nt work.
The link title appears correctly, it's just that the title attribute is not displayed well and it depends on get-simple when generating the menu.
Reply
#5
I think you should try this \"madvic"\
May it will work!!
Reply
#6
No It doesn't work.

When I editing the page title :
Quote:[Image: edit.GIF]

And the result :
Quote:[Image: label.GIF]



josephpratt Wrote:I think you should try this \"madvic"\
May it will work!!
Reply
#7
what's shown in the XML file for the title?
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#8
This :
Quote:<![CDATA[La classe PHP \&quot;Label\&quot;]]>
Reply
#9
This has been fixed in the latest version.
My Github Repos: Github
Website: DigiMute
Reply
#10
n00dles101 Wrote:This has been fixed in the latest version.

Hello,
I test with the last version. And an error appear :
[Image: label2.gif]
and the xml code :
Code:
<![CDATA[La classe PHP \&quot;Label\&quot;]]>

Thanks
Reply
#11
what are you using to create the menu?
the inbuild get_navigation function or a plugin?
My Github Repos: Github
Website: DigiMute
Reply
#12
n00dles101 Wrote:what are you using to create the menu?
the inbuild get_navigation function or a plugin?

I use this function :
Code:
<ul class="menu clearfix">
            <?php get_navigation(return_page_slug()); ?>
        </ul>
Reply
#13
I'm sorry I can't replicate this problem with the latest version.

Are you sure your are using the latest Beta release?
My Github Repos: Github
Website: DigiMute
Reply
#14
I've been able to replicate this.

Server with magic_quotes_gpc enabled (most usual setting for PHP 5.2.x).
GS 3.0 site installed.
Create a page with some double quote in the title. Add it to the menu.

Now:

- Upgrade the site to GS 3.1 beta

or

- Install a new GS 3.1 beta site and copy that page's xml file to the new site.

If you edit and save the page again, the problem disappears (backslashes are stripped by GS 3.1 beta).
Reply
#15
I just did the test and that's the problem :
magic_quotes_gpc = On
Reply
#16
Code:
<?php
if (get_magic_quotes_gpc()) {
    function stripslashes_deep($value)
    {
        $value = is_array($value) ?
                    array_map('stripslashes_deep', $value) :
                    stripslashes($value);

        return $value;
    }

    $_POST = array_map('stripslashes_deep', $_POST);
    $_GET = array_map('stripslashes_deep', $_GET);
    $_COOKIE = array_map('stripslashes_deep', $_COOKIE);
}
?>
Reply
#17
I testing the last version : r631, and the problem still exists.
Reply
#18
@madvic (and/or others) Please try this.

Edit admin/inc/theme_functions.php, and around line 608 (after the $url_nav =... and before the if ($page['menuStatus']...), insert this line:

Code:
$page['title'] = stripslashes($page['title']);

(Note to GS developers: I tried with GS's own strip_decode instead of stripslashes, but doesn't work properly for this.)
Reply
#19
Can someone check that this fix works on a system with magic quotes on and I can update the SVN.
My Github Repos: Github
Website: DigiMute
Reply
#20
I added the line as suggested and the result is ok:

see here:

http://www.krisendichte.de/test-test-test-test/

- the URL is ok
- the title is ok at the site

For me it looks ok, the page-xml is added as zip
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#21
Thanks Connie.
This doesn't change anything, only the way get_navigation() renders the menu (links' titles and title attribute)
Reply
#22
[Image: test.jpg]

I think everywhere it is ok, or do I oversee something?
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#23
Mike,

It's not that important (not an usual thing), but still if there's a backslash (\) in the menu title, it will be rendered twice (\\.)
So another line should be added there:

Code:
$page['menu'] = stripslashes($page['menu']);

Another way, if you prefer this instead, could be putting both calls to stripslashes in line 613, changing:
Code:
$page['title'] .'">'.$page['menu'].
to:
Code:
stripslashes($page['title']) .'">'.stripslashes($page['menu']).
Reply
#24
Carlos Wrote:@madvic (and/or others) Please try this.

Edit admin/inc/theme_functions.php, and around line 608 (after the $url_nav =... and before the if ($page['menuStatus']...), insert this line:

Code:
$page['title'] = stripslashes($page['title']);

(Note to GS developers: I tried with GS's own strip_decode instead of stripslashes, but doesn't work properly for this.)

Yeahh Carlos !
Great, It's work fine !
Reply
#25
Mike & Chris,

Just another comment. Though my suggested patches fix this small issue, I have realized that the way that 3.1 is rendering the menu (with or without the patch) is not the same as 3.0 did: the title field allows html tags, that should be removed in menu titles.

e.g. a title like: This is <b>bold</b>
- is shown in 3.0 menu as This is bold
- and in 3.1 beta as This is <b>bold</b>

The page title (<h1>...</h1>) is shown as This is bold in both cases.

(I presume this is because get_navigation() was changed to use new internal page caching functions.)


-----------

EDIT: All this has been fixed in r650
Reply




Users browsing this thread: 3 Guest(s)