View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003317 | OXID eShop (all versions) | 4.09. SEO, SEO URL | public | 2011-10-17 15:57 | 2012-12-10 13:34 |
Reporter | ivoba | Assigned To | |||
Priority | high | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.5.3 revision 39087 | ||||
Fixed in Version | 4.5.12 revision 52682 | ||||
Summary | 0003317: _prepareMetaDescription doesnt remove style tags properly | ||||
Description | If _getMetaFromContent is the source of the meta decription, then strip_tags in prepareMetaDescription is not sufficient. If you would have rich text in your content, by f.e. using fckeditor, you will have style definitions and strip_tags wont replace the style declarations. see: "strip_tags has doesn't recognize that css within the style tags are not document text. To fix this do something similar to the following: $htmlstring = preg_replace("'<style[^>]*>.*</style>'siU",'',$htmlstring);" http://php.net/manual/en/function.strip-tags.php | ||||
Tags | No tags attached. | ||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
|
maybe this also belongs to: _getMetaFromContent() and should be: $r = preg_replace("'<style[^>]*>.*</style>'siU",'',$oContent->oxcontents__oxcontent->value); return strip_tags( $r ); |
|
$sMeta = preg_replace('#<(script|style)[^>]*>.+</\1>#Usi','',$sMeta); this should also go into: views/details.php (Line: 433 _prepareMetaDescription()) |
|
and views/alist.php (Line: 579) $sDesc = strip_tags( trim( $oStr->strtolower( preg_replace('#<(script|style)[^>]*>.+</\1>#Usi','',$oProduct->getArticleLongDesc()->value )) ) ); |