aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMaryana Rozhankivska <mariroz@mr.lviv.ua>2014-05-26 14:29:18 +0300
committerMaryana Rozhankivska <mariroz@mr.lviv.ua>2014-05-26 14:29:18 +0300
commit0b9bb8cb7868f24137c5d8b85c39cc88ea877411 (patch)
tree558818975ac41403e7d55ad07c5b0ac29806e907
parent009669360d46645d8f84f444fe0f6895811f51a3 (diff)
downloadwallabag-0b9bb8cb7868f24137c5d8b85c39cc88ea877411.tar.gz
wallabag-0b9bb8cb7868f24137c5d8b85c39cc88ea877411.tar.zst
wallabag-0b9bb8cb7868f24137c5d8b85c39cc88ea877411.zip
add dailymotion videos, issue #708
-rwxr-xr-xinc/3rdparty/site_config/custom/dailymotion.com.txt12
-rwxr-xr-xinc/poche/Poche.class.php11
2 files changed, 18 insertions, 5 deletions
diff --git a/inc/3rdparty/site_config/custom/dailymotion.com.txt b/inc/3rdparty/site_config/custom/dailymotion.com.txt
new file mode 100755
index 00000000..0cad808f
--- /dev/null
+++ b/inc/3rdparty/site_config/custom/dailymotion.com.txt
@@ -0,0 +1,12 @@
1title: //title
2body: //iframe
3
4replace_string(<![CDATA[): _
5replace_string(]]>): _
6
7single_page_link: //link[@type='application/xml+oembed']
8
9prune: no
10tidy: no
11
12http://www.dailymotion.com/video/x1vk5oh_before-they-were-on-game-of-thrones_people
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 1b69cd61..37cf66a3 100755
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -1142,11 +1142,12 @@ class Poche
1142 * return new purifier object with actual config 1142 * return new purifier object with actual config
1143 */ 1143 */
1144 protected function getPurifier() { 1144 protected function getPurifier() {
1145 $config = HTMLPurifier_Config::createDefault(); 1145 $config = HTMLPurifier_Config::createDefault();
1146 $config->set('Cache.SerializerPath', CACHE); 1146 $config->set('Cache.SerializerPath', CACHE);
1147 $config->set('HTML.SafeIframe', true); 1147 $config->set('HTML.SafeIframe', true);
1148 $config->set('URI.SafeIframeRegexp', '%^(https?:)?//(www\.youtube(?:-nocookie)?\.com/embed/|player\.vimeo\.com/video/)%'); //allow YouTube and Vimeo$purifier = new HTMLPurifier($config); 1148 //allow YouTube, Vimeo and dailymotion videos
1149 1149 $config->set('URI.SafeIframeRegexp', '%^(https?:)?//(www\.youtube(?:-nocookie)?\.com/embed/|player\.vimeo\.com/video/|www\.dailymotion\.com/embed/video/)%');
1150
1150 return new HTMLPurifier($config); 1151 return new HTMLPurifier($config);
1151 } 1152 }
1152 1153