diff --git a/functions.php b/functions.php index e058a1b..84c5e3b 100644 --- a/functions.php +++ b/functions.php @@ -1557,6 +1557,44 @@ function html_tag_parser($content) { ', $content ); + } + //html tag parser for rss + if(is_feed()) { + //Fancybox + $url_regex ='((?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>?«»“”‘’]))'; + if (preg_match_all('/\!\{.*?\)\[.*?\]/i', $content,$matches)){ + $i=0; + if ($i', + $matches[$i]), + $content); + $i++; + } + } + $content=preg_replace( + '/!\{([^\{\}]+)*\}\('.$url_regex.'\)/i', + '', + $content + ); + + //Github cards + $content=preg_replace( + '/\[github repo=[\'"]([^\'"]+)[\'"]\]/i', + '