форум vBSupport.ru > vBulletin > vBulletin 3.8.x > Вопросы по vBulletin 3.8
  • »
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
 
 
 
 
Nook
На доске почёта
пожелание узера
 
banned nax
Default Не отображаются умляуты после обновления
0

В общем, дело вот в чем. Обновился с 3.8.4 pl2 до 3.8.6 и возникла следующая проблема. Умляуты типа ?, ?, ? и тд и тп перестали отображаться, выдавая вместо себя цыфровые обозначения по типу & #237; & #252;

Стоит vbseo 3.5.1 но оно точно не при чем, так как я проверил и выключил его - ничего не изменилось.

Форум в cp1251

Что интереснее всего, в названиях тем умляуты отображаются нормально, а в тексте сообщений - так как указано выше. В базе данных всё записано совершенно одинаково. Если кто сможет помочь - отблагодарю, спасибо.

Nook добавил 20.07.2010 в 01:02
оказалось, что это баг именно 6-й версии. так что будем разбираться

Nook добавил 20.07.2010 в 20:54
пока что решается заменой ./includes/class_core.php на версию из 3.8.5

Last edited by Nook : 07-21-2010 at 11:09 PM. Reason: Добавлено сообщение
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 
 
kerk
k0t
 
kerk's Avatar
Default
0

в файле class_core.php версии 3.8.6 добавилась функция:
PHP Code:
function htmlspecialchars_uni_callback($matches)
{

    if (
count($matches) == 1)
    {
        return 
'&';
    }

    if (
strpos($matches[2], '#') === false)
    {
        
// > like
        
if ($matches[2] == 'shy')
        {
            return 
'­';
        }
        else
        {
            return 
"&$matches[2];";
        }
    }
    else
    {
        
// Only convert chars that are in ISO-8859-1
        
if (($matches[3] >= 32 AND $matches[3] <= 126)
            OR
            (
$matches[3] >= 160 AND $matches[3] <= 255))
        {
            return 
"&amp;#$matches[3];";
        }
        else
        {
            return 
"&#$matches[3];";
        }
    }

и соотв. переписали функцию (htmlspecialchars_uni())
было:
PHP Code:
function htmlspecialchars_uni($text$entities true)
{
    return 
str_replace(
        
// replace special html characters
        
array('<''>''"'),
        array(
'&lt;''&gt;''&quot;'),
        
preg_replace(
            
// translates all non-unicode entities
            
'/&(?!' . ($entities '#[0-9]+|shy' '(#[0-9]+|[a-z]+)') . ';)/si',
            
'&amp;',
            
$text
        
)
    );

заменили на:
PHP Code:
function htmlspecialchars_uni($text$entities true)
{
    if (
$entities)
    {
        
$text preg_replace_callback(
            
'/&((#([0-9]+)|[a-z]+);)?/si',
            
'htmlspecialchars_uni_callback',
            
$text
        
);
    }
    else
    {
        
$text preg_replace(
            
// translates all non-unicode entities
            
'/&(?!(#[0-9]+|[a-z]+);)/si',
            
'&amp;',
            
$text
        
);
    }

    return 
str_replace(
        
// replace special html characters
        
array('<''>''"'),
        array(
'&lt;''&gt;''&quot;'),
        
$text
    
);

 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT +4. The time now is 11:40 AM.


Powered by vBulletin® Version 3.0.9
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Loading...