summaryrefslogtreecommitdiff
path: root/inc/parser/xhtml.php
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 /inc/parser/xhtml.php
parent8fe276f7d4bf70c4a798e1c5e7bb3da72a33877d (diff)
downloadrpg-3641199a253e8f92f378f03926af80724ef04146.tar.gz
rpg-3641199a253e8f92f378f03926af80724ef04146.tar.bz2
fixed html errors in video and audio rendering
Diffstat (limited to 'inc/parser/xhtml.php')
-rw-r--r--inc/parser/xhtml.php10
1 files changed, 7 insertions, 3 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;
}