[vlc-commits] luahttp: fix document parsing with inline javascript

Francois Cartegnie git at videolan.org
Wed Sep 7 16:02:45 CEST 2011


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Sep  7 15:54:30 2011 +0200| [18a26247ea83c982132f218bdfb1a6e515f46576] | committer: Francois Cartegnie

luahttp: fix document parsing with inline javascript

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=18a26247ea83c982132f218bdfb1a6e515f46576
---

 share/lua/http/dialogs/batch_window.html     |    4 +++-
 share/lua/http/dialogs/browse_window.html    |    4 +++-
 share/lua/http/dialogs/create_stream.html    |    4 +++-
 share/lua/http/dialogs/equalizer_window.html |    4 +++-
 share/lua/http/dialogs/mosaic_window.html    |    4 +++-
 share/lua/http/dialogs/offset_window.html    |    4 +++-
 share/lua/http/dialogs/stream_window.html    |    4 +++-
 share/lua/http/index.html                    |    4 ++++
 share/lua/http/view.html                     |    5 +++--
 9 files changed, 28 insertions(+), 9 deletions(-)

diff --git a/share/lua/http/dialogs/batch_window.html b/share/lua/http/dialogs/batch_window.html
index c6aa396..de032f9 100644
--- a/share/lua/http/dialogs/batch_window.html
+++ b/share/lua/http/dialogs/batch_window.html
@@ -1,4 +1,5 @@
 <script type="text/javascript">
+//<![CDATA[
 	$(function(){
 		$('#window_batch').dialog({
 			autoOpen: false,
@@ -20,10 +21,11 @@
 			}
 		});
 	})
+//]]>
 </script>
 <div id="window_batch" title="VLM Batch Commands">
 <textarea id="batchCommand" cols="50" rows="16">
 #paste your VLM commands here
 #separate commands with a new line or a semi-colon
 </textarea>
-</div>
\ No newline at end of file
+</div>
diff --git a/share/lua/http/dialogs/browse_window.html b/share/lua/http/dialogs/browse_window.html
index 38a24a1..8d0c4bc 100644
--- a/share/lua/http/dialogs/browse_window.html
+++ b/share/lua/http/dialogs/browse_window.html
@@ -1,4 +1,5 @@
 <script language="javascript" type="text/javascript">
+//<![CDATA[
 	var browse_target		=	'default';
 	$(function(){
 		$('#window_browse').dialog({
@@ -30,6 +31,7 @@
 			}
 		});
 	});
+//]]>
 </script>
 
 <div id="window_browse" title="Media Browser">
@@ -38,4 +40,4 @@
 			<li>Play List</li>
 		</ol>
 	</div>
-</div>
\ No newline at end of file
+</div>
diff --git a/share/lua/http/dialogs/create_stream.html b/share/lua/http/dialogs/create_stream.html
index cc9ddf4..15637bf 100644
--- a/share/lua/http/dialogs/create_stream.html
+++ b/share/lua/http/dialogs/create_stream.html
@@ -1,4 +1,5 @@
 <script language="javascript" type="text/javascript">
+//<![CDATA[
 	$(function(){
 		$('#stream_out_method').change(function(){
 			$('#output_options').empty();
@@ -129,6 +130,7 @@
 
 		return inCode+transCode+outCode;
 	}
+//]]>
 </script>
 <div id="window_create_stream" title="Create Stream">
 	<table width="100%">
@@ -389,4 +391,4 @@
 			<td valign="top"><input type="text" name="stream_out_filename_" id="stream_out_filename_"/></td>
 		</tr>
 	</table>
-</div>
\ No newline at end of file
+</div>
diff --git a/share/lua/http/dialogs/equalizer_window.html b/share/lua/http/dialogs/equalizer_window.html
index 79fbd1c..9a58986 100755
--- a/share/lua/http/dialogs/equalizer_window.html
+++ b/share/lua/http/dialogs/equalizer_window.html
@@ -1,4 +1,5 @@
 <script language="javascript" type="text/javascript">
+//<![CDATA[
 	var bands	=	new Array('60Hz','170Hz','310Hz','600Hz','1kHz','3kHz','6kHz','12kHz','14kHz','16kHz');
 	$(function(){
 		$('#window_equalizer').dialog({
@@ -41,6 +42,7 @@
 			}
 		});
 	});
+//]]>
 </script>
 <div id="window_equalizer" title="Graphical Equalizer">
 	<div style="margin: 5px 5px 5px 5px;">
@@ -49,4 +51,4 @@
 	<div style="margin: 5px 5px 10px 5px;">
 		<div id="preamp" style="font-size: 18px;"></div>
 	</div>
-</div>
\ No newline at end of file
+</div>
diff --git a/share/lua/http/dialogs/mosaic_window.html b/share/lua/http/dialogs/mosaic_window.html
index c721d7c..4eebe36 100644
--- a/share/lua/http/dialogs/mosaic_window.html
+++ b/share/lua/http/dialogs/mosaic_window.html
@@ -1,4 +1,5 @@
 <script language="javascript" type="text/javascript">
+//<![CDATA[
 	$(function(){
 		$('#window_mosaic').dialog({
 			autoOpen: false,
@@ -86,6 +87,7 @@
 			function() { $(this).removeClass('ui-state-hover'); }
 		);
 	}
+//]]>
 </script>
 
 <div id="window_mosaic" title="Create Mosaic">
@@ -141,4 +143,4 @@
 			</tr>
 		</table>
 	</div>
-</div>
\ No newline at end of file
+</div>
diff --git a/share/lua/http/dialogs/offset_window.html b/share/lua/http/dialogs/offset_window.html
index 1b5d375..4b9019a 100644
--- a/share/lua/http/dialogs/offset_window.html
+++ b/share/lua/http/dialogs/offset_window.html
@@ -1,4 +1,5 @@
 <script language="javascript" type="text/javascript">
+//<![CDATA[
 	$(function(){
 		$('#window_offset').dialog({
 			autoOpen: false,
@@ -61,6 +62,7 @@
 			}
 		});
 	});
+//]]>
 </script>
 <div id="window_offset" title="Track Synchronisation">
 	<div>Playback Rate</div>
@@ -74,4 +76,4 @@
 	<div>Subtitle Delay</div>
 	<div id="subtitleSlider" title="Subtitle Delay"></div>
 	<div id="currentSubtitleDelay" class="dynamic">0s</div>
-</div>
\ No newline at end of file
+</div>
diff --git a/share/lua/http/dialogs/stream_window.html b/share/lua/http/dialogs/stream_window.html
index 288e2f7..1083072 100644
--- a/share/lua/http/dialogs/stream_window.html
+++ b/share/lua/http/dialogs/stream_window.html
@@ -1,4 +1,5 @@
 <script language="javascript" type="text/javascript">
+//<![CDATA[
 	var stream_server		=	window.location.hostname;
 	function configureStreamWindow(stream_protocol,stream_server,stream_port,stream_file){
 		$('#stream_protocol').val(stream_protocol);
@@ -49,6 +50,7 @@
 		})
 		$('#stream_host').val(stream_server);
 	});
+//]]>
 </script>
 <div id="stream_status_" style="visibility:hidden;display:none;">
 	<h3><a href="#" id="stream_title_"></a></h3>
@@ -94,4 +96,4 @@
 			<td><input type="text" name="stream_file" id="stream_file" value="stream.flv" /></td>
 		</tr>
 	</table>
-</div>
\ No newline at end of file
+</div>
diff --git a/share/lua/http/index.html b/share/lua/http/index.html
index 50f25bb..8b4d273 100644
--- a/share/lua/http/index.html
+++ b/share/lua/http/index.html
@@ -28,9 +28,11 @@
 		<link href="favicon.ico" type="image/x-icon" rel="shortcut icon" />
 		<script type="text/javascript" src="js/common.js"></script>
 		<script type="text/javascript">
+		//<![CDATA[
 			if(isMobile()){
 				window.location='mobile.html';
 			}
+		//]]>
 		</script>
 		<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.13.custom.css" rel="stylesheet" />
 		<link type="text/css" href="css/main.css" rel="stylesheet" />
@@ -41,6 +43,7 @@
 		<script type="text/javascript" src="js/ui.js"></script>
 		<script type="text/javascript" src="js/controlers.js"></script>
 		<script type="text/javascript">
+		//<![CDATA[
 			var pollStatus	=	true;
 			$(function(){
 				$('.button').hover(function(){$(this).addClass('ui-state-hover')},function(){$(this).removeClass('ui-state-hover')});
@@ -185,6 +188,7 @@
 				});
 				$('#viewContainer').animate({height: 'toggle'});
 			});
+		//]]>
 		</script>
 	</head>
 	<body>
diff --git a/share/lua/http/view.html b/share/lua/http/view.html
index 99fd531..10ed9ff 100644
--- a/share/lua/http/view.html
+++ b/share/lua/http/view.html
@@ -33,7 +33,7 @@
 	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>
 	<script type="text/javascript" src="http://static.flowplayer.org/js/flowplayer-3.2.6.min.js"></script>
 	<script language="javascript" type="text/javascript">
-	
+	//<![CDATA[
 	$(function(){
 		$('#window_stream').resizable({
 			minHeight: 300,
@@ -52,6 +52,7 @@
 		$('#player').attr('href',$('#stream_protocol').val()+'://'+$('#stream_host').val()+':'+$('#stream_port').val()+'/'+$('#stream_file').val());
 		flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf");
 	});
+	//]]>
 	</script>
 	<style>
 	#window_stream { width: 800px; height: 600px; padding: 0.5em; }
@@ -78,4 +79,4 @@
 	dialogs("stream_config_window.html");
 	?>
 </body>
-</html>
\ No newline at end of file
+</html>



More information about the vlc-commits mailing list