summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnika Henke <anika@selfthinker.org>2014-02-02 14:42:47 +0000
committerAnika Henke <anika@selfthinker.org>2014-02-02 14:42:47 +0000
commit3641199a253e8f92f378f03926af80724ef04146 (patch)
tree2f8a71b526358119f91ae5079be1001dfe4bcc11
parent8fe276f7d4bf70c4a798e1c5e7bb3da72a33877d (diff)
downloadrpg-3641199a253e8f92f378f03926af80724ef04146.tar.gz
rpg-3641199a253e8f92f378f03926af80724ef04146.tar.bz2
fixed html errors in video and audio rendering
-rw-r--r--inc/parser/xhtml.php10
-rw-r--r--lib/tpl/dokuwiki/css/basic.less6
2 files changed, 10 insertions, 6 deletions
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 5fca1bf45..80701cd2e 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -1302,8 +1302,9 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$out = '';
// open video tag
$out .= '<video '.buildAttributes($atts).' controls="controls"';
- if ($posterUrl) $out .= ' poster="'.$posterUrl.'"';
+ if ($posterUrl) $out .= ' poster="'.hsc($posterUrl).'"';
$out .= '>'.NL;
+ $fallback = '';
// output source for each alternative video format
foreach($alternatives as $mime => $file) {
@@ -1312,10 +1313,11 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$out .= '<source src="'.hsc($url).'" type="'.$mime.'" />'.NL;
// alternative content (just a link to the file)
- $out .= $this->internalmedia($file, $title, NULL, NULL, NULL, $cache=NULL, $linking='linkonly', $return=true);
+ $fallback .= $this->internalmedia($file, $title, NULL, NULL, NULL, $cache=NULL, $linking='linkonly', $return=true);
}
// finish
+ $out .= $fallback;
$out .= '</video>'.NL;
return $out;
}
@@ -1338,6 +1340,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$out = '';
// open audio tag
$out .= '<audio '.buildAttributes($atts).' controls="controls">'.NL;
+ $fallback = '';
// output source for each alternative audio format
foreach($alternatives as $mime => $file) {
@@ -1346,10 +1349,11 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$out .= '<source src="'.hsc($url).'" type="'.$mime.'" />'.NL;
// alternative content (just a link to the file)
- $out .= $this->internalmedia($file, $title, NULL, NULL, NULL, $cache=NULL, $linking='linkonly', $return=true);
+ $fallback .= $this->internalmedia($file, $title, NULL, NULL, NULL, $cache=NULL, $linking='linkonly', $return=true);
}
// finish
+ $out .= $fallback;
$out .= '</audio>'.NL;
return $out;
}
diff --git a/lib/tpl/dokuwiki/css/basic.less b/lib/tpl/dokuwiki/css/basic.less
index 636923192..c296185e9 100644
--- a/lib/tpl/dokuwiki/css/basic.less
+++ b/lib/tpl/dokuwiki/css/basic.less
@@ -93,8 +93,6 @@ pre,
table,
hr,
blockquote,
-video,
-audio,
figure,
details,
fieldset,
@@ -103,7 +101,9 @@ address {
padding: 0;
}
-div {
+div,
+video,
+audio {
margin: 0;
padding: 0;
}