package s5 retitle 699642 s5: fails to present document as XHTML tags 699642 + patch kthxbye
Apparently, it is not the use of innerHTML itself that is causing this not to work, just some buggy JavaScript. When using innerHTML with XHTML, the value must be well-formed XML. Since we cannot rely on the DOCTYPE having been parsed (since it won't be), we need to use numeric character references instead of the standard HTML ones. Also, trying to concatenate an undefined value with a string does not produce nice (i.e. well-formed XML) results. I've attached a patch to slides.js to fix these problems. With the patch, the file renders nicely as XHTML. Please forward it upstream. -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
--- slides.js.orig 2013-03-10 02:13:53.352714059 +0000 +++ slides.js 2013-03-10 02:13:40.872780437 +0000 @@ -375,7 +375,7 @@ var controlsDiv = document.getElementById("controls"); if (!controlsDiv) return; var hider = ' onmouseover="showHide(\'s\');" onmouseout="showHide(\'h\');"'; - var hideDiv, hideList = ''; + var hideDiv = '', hideList = ''; if (controlVis == 'hidden') { hideDiv = hider; } else { @@ -384,8 +384,8 @@ controlsDiv.innerHTML = '<form action="#" id="controlForm"' + hideDiv + '>' + '<div id="navLinks">' + '<a accesskey="t" id="toggle" href="javascript:toggle();">Ø<\/a>' + - '<a accesskey="z" id="prev" href="javascript:go(-1);">«<\/a>' + - '<a accesskey="x" id="next" href="javascript:go(1);">»<\/a>' + + '<a accesskey="z" id="prev" href="javascript:go(-1);">«<\/a>' + + '<a accesskey="x" id="next" href="javascript:go(1);">»<\/a>' + '<div id="navList"' + hideList + '><select id="jumplist" onchange="go(\'j\');"><\/select><\/div>' + '<\/div><\/form>'; if (controlVis == 'hidden') { @@ -550,4 +550,4 @@ } window.onload = startup; -window.onresize = function(){setTimeout('fontScale()', 50);} \ No newline at end of file +window.onresize = function(){setTimeout('fontScale()', 50);}
signature.asc
Description: Digital signature