]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
add dailymotion videos, issue #708 707/head
authorMaryana Rozhankivska <mariroz@mr.lviv.ua>
Mon, 26 May 2014 11:29:18 +0000 (14:29 +0300)
committerMaryana Rozhankivska <mariroz@mr.lviv.ua>
Mon, 26 May 2014 11:29:18 +0000 (14:29 +0300)
inc/3rdparty/site_config/custom/dailymotion.com.txt [new file with mode: 0755]
inc/poche/Poche.class.php

diff --git a/inc/3rdparty/site_config/custom/dailymotion.com.txt b/inc/3rdparty/site_config/custom/dailymotion.com.txt
new file mode 100755 (executable)
index 0000000..0cad808
--- /dev/null
@@ -0,0 +1,12 @@
+title: //title
+body: //iframe
+
+replace_string(<![CDATA[): _
+replace_string(]]>): _
+
+single_page_link: //link[@type='application/xml+oembed']
+
+prune: no
+tidy: no
+
+http://www.dailymotion.com/video/x1vk5oh_before-they-were-on-game-of-thrones_people
index 1b69cd619a74d4f82662418dc79bd998cee67066..37cf66a3ef9d12382658615c24b2b7016bf49fff 100755 (executable)
@@ -1142,11 +1142,12 @@ class Poche
      * return new purifier object with actual config
      */
     protected function getPurifier() {
-      $config = HTMLPurifier_Config::createDefault();\r
-      $config->set('Cache.SerializerPath', CACHE);\r
-      $config->set('HTML.SafeIframe', true);\r
-      $config->set('URI.SafeIframeRegexp', '%^(https?:)?//(www\.youtube(?:-nocookie)?\.com/embed/|player\.vimeo\.com/video/)%'); //allow YouTube and Vimeo$purifier = new HTMLPurifier($config);
-\r
+      $config = HTMLPurifier_Config::createDefault();
+      $config->set('Cache.SerializerPath', CACHE);
+      $config->set('HTML.SafeIframe', true);
+      //allow YouTube, Vimeo and dailymotion videos
+      $config->set('URI.SafeIframeRegexp', '%^(https?:)?//(www\.youtube(?:-nocookie)?\.com/embed/|player\.vimeo\.com/video/|www\.dailymotion\.com/embed/video/)%');
+
       return new HTMLPurifier($config);
     }