Одмин Posted October 10, 2014 Share Posted October 10, 2014 Добрый день! Подскажите с чем может быть связано то, что если просматривать исходный код главной страницы форума, то содержимое keywords отображается в нормальном читаемом виде, а если исходный код просматривать из любой темы, то содержимое keywords зашифровано. Скрин прилагаю. P.S. Не может ли это быть следствием того, что я недавно кодировал url во внешних ссылках? Link to comment Share on other sites More sharing options...
siv1987 Posted October 10, 2014 Share Posted October 10, 2014 В 3.2x все метатеги (включая дескрипшина кстати) кодировались в html-сущности.С 3.3x кодируются только для бота фейсбука. В \admin\sources\classes\output\formats\coreOutput.phpНайти: public function encodeMetaTagContent( $content ) { $content = IPSText::htmlspecialchars( $content ); # Hebrew chars screw up Facebook sharer if ( IPS_DOC_CHAR_SET == 'UTF-8' && IPSText::isUTF8( $content ) ) { $content = IPSText::utf8ToEntities( $content ); } return $content; } Заменить на public function encodeMetaTagContent( $content, $makeUTF8Safe=false ) { $content = IPSText::htmlspecialchars( $content ); # Hebrew chars screw up Facebook sharer if ( $makeUTF8Safe === true && IPS_DOC_CHAR_SET == 'UTF-8' && IPSText::isUTF8( $content ) ) { $content = IPSText::utf8ToEntities( $content ); } return $content; } Найти $content = preg_replace( '/\<p class=\'citation\'\>.+?\<\/p\>/ims', '', $content ); # Hebrew chars screw up Facebook sharer $content = $this->encodeMetaTagContent( strip_tags( IPSText::stripAttachTag( $content ) ) ); Заменить на $content = preg_replace( '/\<p class=\'citation\'\>.+?\<\/p\>/ims', '', $content ); $content = strip_tags( IPSText::stripAttachTag( $content ) ); # Hebrew chars screw up Facebook sharer if( $this->memberData['members_display_name'] == 'Facebook' ) { $content = $this->encodeMetaTagContent( $content, true ); } 1 Link to comment Share on other sites More sharing options...
Одмин Posted October 10, 2014 Author Share Posted October 10, 2014 @siv1987, благодарю. А нельзя ли пояснить, для каких целей кодировались мета-теги? Link to comment Share on other sites More sharing options...
siv1987 Posted October 10, 2014 Share Posted October 10, 2014 # Hebrew chars screw up Facebook sharer Link to comment Share on other sites More sharing options...
Одмин Posted October 10, 2014 Author Share Posted October 10, 2014 @siv1987, понял)) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now