Răsfoiți Sursa

#910 Meta Keywords parsing issues

Alex Trofimov 8 ani în urmă
părinte
comite
4f22104f12
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      inc/classes/BxDolMetatags.php

+ 2 - 2
inc/classes/BxDolMetatags.php

@@ -228,7 +228,7 @@ class BxDolMetatags extends BxDolFactory implements iBxDolFactoryObject
     public function keywordsAdd($iId, $s) 
     public function keywordsAdd($iId, $s) 
     {
     {
         $a = array();
         $a = array();
-        if (!preg_match_all('/[^&](\#[\pL\pN_]+)/u', ' ' . strip_tags($s), $a)) {
+        if (!preg_match_all('/[\s](\#[\pL\pN_]+)/u', ' ' . strip_tags($s), $a)) {
             $this->_oQuery->keywordsDelete($iId);
             $this->_oQuery->keywordsDelete($iId);
             return 0;
             return 0;
         }
         }
@@ -264,7 +264,7 @@ class BxDolMetatags extends BxDolFactory implements iBxDolFactoryObject
         $aFields = $this->keywordsFields($aContentInfo, $CNF, $sFormDisplay); 
         $aFields = $this->keywordsFields($aContentInfo, $CNF, $sFormDisplay); 
         $sTextWithKeywords = '';
         $sTextWithKeywords = '';
         foreach ($aFields as $sField)
         foreach ($aFields as $sField)
-            $sTextWithKeywords .= $aContentInfo[$sField];
+            $sTextWithKeywords .= "\n" . $aContentInfo[$sField];
 
 
         return $this->keywordsAdd($iId, $sTextWithKeywords);
         return $this->keywordsAdd($iId, $sTextWithKeywords);
     }
     }