]> git.wh0rd.org - tt-rss.git/blobdiff - functions.php
disable html objects in article content, breaks layout
[tt-rss.git] / functions.php
index 600a776c6394cd1e5a1bb5cb79dc3afd7dcb16aa..e5f06da371b4e82e951438ed8ad16aed696260e1 100644 (file)
                $res = preg_replace('/<\/script>/i', 
                        "</p>", $res);
 
+               $res = preg_replace('/<object.*?>.*?<\/object>/i', 
+                       "<p class=\"objectWarn\">(Disabled html object 
+                       - flash or other embedded content)</p>", $str);
+
+               $res = preg_replace('/<\/object>/i', 
+                       "</p>", $res);
+
                return $res;
        }
 
                }
        }
 
+       function escape_for_form($s) {
+               return htmlspecialchars(db_unescape_string($s));
+       }
+
 ?>