XPressME Integration Kit

Trac

Opened 15 years ago

Closed 15 years ago

#120 closed バグ(bug) (修正しない)

All in One SEO Packのキーワード対応

Reported by: toemon Owned by: toemon
Priority: 普通 Milestone: Ver.2.0.0
Component: プラグイン対応 Version: 2.0.0
Severity: 普通 Keywords:
Cc:

Description

XPressMEではAll in One SEO Packのキーワードがモジュールトップページでしか作成されない。

Change History (1)

comment:1 Changed 15 years ago by toemon

  • Resolution set to 修正しない
  • Status changed from new to closed

たまたまチェックしたシングルページがディスクリプションを吐かないだけで、どうもAll in One SEO Pack 側の以下の箇所、でまともにマルチバイト処理を行っていない為に発生していました。(もう完全に1バイトで英語圏の単語間にスペースがある言語を対象に処 理してますね)

function trim_excerpt_without_filters($text) {
		$text = str_replace(']]>', ']]>', $text);
                $text = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $text );
                $text = preg_replace('/\s\s+/', '', $text);
		$text = strip_tags($text);
		$max = $this->maximum_description_length;

		if ($max < strlen($text)) {
			while($text[$max] != ' ' && $max > $this->minimum_description_length) {
				$max--;
			}
		}
		$text = substr($text, 0, $max);
		return trim(stripcslashes($text));
	}
Note: See TracTickets for help on using tickets.