Skip to main content

Incorrect display Unicode in SEF url

More
10 years 10 months ago - 10 years 10 months ago #222899 by ebrahimiali
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.5
-- Browser(s) name and version -- : chrome
-- Error-message(debug-mod must be tuned on) -- : Incorrect display Unicode in SEF url

I've found 3 errors for Unicode languages.

in :
Create Metakeyword unicode :
file : back\helpers\seo.php
line 44
old :
Code:
if(strlen($word)<3){
best :
Code:
if(mb_strlen($word)<3){

=====================================
Create MetaDescription:
file : back\helpers\seo.php
line26

old :
Code:
$meta = substr($this->clean($element->$description),0,$max);
best :
Code:
$meta = mb_substr($this->clean($element->$description),0,$max);

=====================================
Create UTF8 SEF url:
file : back\classes\product.php
Old :
Code:
if(method_exists($app,'stringURLSafe')){ $element->alias = $app->stringURLSafe($element->alias); }else{ $element->alias = JFilterOutput::stringURLSafe($element->alias); }
Best :
Code:
if(method_exists($app,'stringURLSafe')){ $element->alias = $app->stringURLSafe($element->alias); }else{ $element->alias = JFilterOutput::stringURLUnicodeSlug($element->alias); }

=====================================
Create UTF8 SEF url:
file : back\classes\category.php
old :
Code:
$app = JFactory::getApplication(); if(method_exists($app,'stringURLSafe')) $element->alias = $app->stringURLSafe(strip_tags($element->alias)); else $element->alias = JFilterOutput::stringURLSafe(strip_tags($element->alias));
best:
Code:
$app = JFactory::getApplication(); if(method_exists($app,'stringURLSafe')) $element->alias = $app->stringURLSafe(strip_tags($element->alias)); else $element->alias = JFilterOutput::stringURLUnicodeSlug(strip_tags($element->alias));

=====================================
Create UTF8 SEF url:
file : back\classes\cart.php
old :
Code:
if(method_exists($app,'stringURLSafe')){ $alias = $app->stringURLSafe($alias); }else{ $alias = JFilterOutput::stringURLSafe($alias); }
best:
Code:
if(method_exists($app,'stringURLSafe')){ $alias = $app->stringURLSafe($alias); }else{ $alias = JFilterOutput::stringURLUnicodeSlug($alias); }
Last edit: 10 years 10 months ago by Jerome. Reason: [code] is nice
The following user(s) said Thank You: Jerome

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #222986 by nicolas
Hi,

Thank you for sharing your modifications. We'll include them on our end for better UTF8 support in the URLs with the next version.

Please Log in or Create an account to join the conversation.

Time to create page: 0.144 seconds
Powered by Kunena Forum