Posts: 105
Threads: 10
Joined: Dec 2009
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
Posts: 105
Threads: 10
Joined: Dec 2009
2011-09-16, 17:38:07
(This post was last modified: 2011-09-16, 17:38:19 by Jeff.)
no one has the same problem with the beta ?
Posts: 1,204
Threads: 30
Joined: Jun 2010
try with this title
my name is \"madvic\"
Addons: blue business theme, Online Visitors, Notepad
Posts: 105
Threads: 10
Joined: Dec 2009
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.
Posts: 1
Threads: 0
Joined: Oct 2011
I think you should try this \"madvic"\
May it will work!!
Posts: 105
Threads: 10
Joined: Dec 2009
No It doesn't work.
When I editing the page title :
Quote:
And the result :
Quote:
josephpratt Wrote:I think you should try this \"madvic"\
May it will work!!
Posts: 1,848
Threads: 86
Joined: Aug 2009
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!
Posts: 105
Threads: 10
Joined: Dec 2009
This :
Quote:<![CDATA[La classe PHP \"Label\"]]>
Posts: 1,108
Threads: 70
Joined: Aug 2009
This has been fixed in the latest version.
Posts: 105
Threads: 10
Joined: Dec 2009
n00dles101 Wrote:This has been fixed in the latest version.
Hello,
I test with the last version. And an error appear :
and the xml code :
Code: <![CDATA[La classe PHP \"Label\"]]>
Thanks
Posts: 1,108
Threads: 70
Joined: Aug 2009
what are you using to create the menu?
the inbuild get_navigation function or a plugin?
Posts: 105
Threads: 10
Joined: Dec 2009
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>
Posts: 1,108
Threads: 70
Joined: Aug 2009
I'm sorry I can't replicate this problem with the latest version.
Are you sure your are using the latest Beta release?
Posts: 3,491
Threads: 106
Joined: Mar 2010
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).
Posts: 105
Threads: 10
Joined: Dec 2009
I just did the test and that's the problem :
magic_quotes_gpc = On
Posts: 105
Threads: 10
Joined: Dec 2009
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);
}
?>
Posts: 105
Threads: 10
Joined: Dec 2009
I testing the last version : r631, and the problem still exists.
Posts: 3,491
Threads: 106
Joined: Mar 2010
@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.)
Posts: 1,108
Threads: 70
Joined: Aug 2009
Can someone check that this fix works on a system with magic quotes on and I can update the SVN.
Posts: 2,928
Threads: 195
Joined: Feb 2011
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
Posts: 3,491
Threads: 106
Joined: Mar 2010
Thanks Connie.
This doesn't change anything, only the way get_navigation() renders the menu (links' titles and title attribute)
Posts: 2,928
Threads: 195
Joined: Feb 2011
I think everywhere it is ok, or do I oversee something?
Posts: 3,491
Threads: 106
Joined: Mar 2010
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']).
Posts: 105
Threads: 10
Joined: Dec 2009
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 !
Posts: 3,491
Threads: 106
Joined: Mar 2010
2012-01-18, 05:38:22
(This post was last modified: 2012-02-13, 05:17:32 by fotothink.)
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
|