X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   News and Announcements (https://forum.x-cart.com/forumdisplay.php?f=28)
-   -   X-Cart v4.4.3 released (https://forum.x-cart.com/showthread.php?t=59213)

cflsystems 08-19-2011 05:44 AM

Re: X-Cart v4.4.3 released
 
Found this on 4.4.3 with static pages but most likely applies to all 4.4.x on all pages. If you have a static page "First & Second" you can give it a name "First & Second" so you don't get validation errors. Custom title of the page cannot be saved as "First & Second" - it converts back to "First & Second". So when you go to the page on the front end the title of the page in the html code is "First & Second" and what you see on browser title is "First & Second" which is obviously wrong. This is due to conversion made in /include/templater/plugins/function.get_title.php by this code

Code:

    // escape
    if (X_USE_NEW_HTMLSPECIALCHARS) {
        $charset = $smarty->get_template_vars('default_charset') ? $smarty->get_template_vars('default_charset') : 'ISO-8859-1';
        $title = @htmlspecialchars($title, ENT_QUOTES, $charset);

    } else {
        $title = htmlspecialchars($title, ENT_QUOTES);
    }


Adding false to this line

Code:

$title = @htmlspecialchars($title, ENT_QUOTES, $charset, false);

so no encoding is performed on existing html entities fixes it.

This same is use also for meta description and keywords
/include/templater/plugins/function.meta.php

cflsystems 08-31-2011 05:45 PM

Re: X-Cart v4.4.3 released
 
Another 4.4.x bug

https://bugtracker.qtmsoft.com/view.php?id=40243


All times are GMT -8. The time now is 02:20 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.