Permalink
Browse files

Closes #854. Script tags are converted into executable commands when …

…the HTML is converted to a String for use in JavaScript
  • Loading branch information...
1 parent a8d4a89 commit 2be671e745f1d370c0a11c0c15bda49cbc26b1c0 @dpp dpp committed Jan 19, 2011
@@ -1,5 +1,5 @@
/*
- * Copyright 2010 WorldWide Conferencing, LLC
+ * Copyright 2010-2011 WorldWide Conferencing, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,18 +14,18 @@
* limitations under the License.
*/
-package net.liftweb {
-package example {
-package snippet {
+package net.liftweb
+package example
+package snippet
-import _root_.net.liftweb._
+import net.liftweb._
import http._
import util._
import js._
import JsCmds._
import JE._
-import _root_.scala.xml._
+import scala.xml._
/**
* A demo of the LiftSession.addPostPageJavaScript feature.
@@ -54,6 +54,3 @@ object Timely {
in
}
}
-}
-}
-}
@@ -48,7 +48,7 @@
The <i>Lift</i> Scala code to render the controls:
<br >
- <head>
+ <head_merge>
<style type="text/css">
/* <![CDATA[ */
.comment {
@@ -81,7 +81,7 @@
}
/* ]]> */
</style>
- </head>
+ </head_merge>
<pre>
<span class="keyword">class</span> <span class="type">Ajax</span> {
@@ -2,7 +2,7 @@
<div class="lift:ArcChallenge.ask?form=post"></div>
<p>The Code</p>
- <head>
+ <head_merge>
<style type="text/css">
/* <![CDATA[ */
.comment {
@@ -36,7 +36,7 @@
/* ]]> */
</style>
- </head>
+ </head_merge>
<pre>
<span class="comment-delimiter">/**</span><span class="comment">
@@ -3,7 +3,7 @@
<p><lift:Count name="first">The first value is <count:value></count:value> <count:incr>Increment</count:incr> <count:decr>Decrement</count:decr></lift:Count></p>
<p><div class="lift:Count?name=second">The second value is <count:value></count:value> <count:incr>Increment</count:incr> <count:decr>Decrement</count:decr></div></p>
-<head>
+<head_merge>
<style type="text/css">
<![CDATA[
.comment {
@@ -36,7 +36,7 @@
}
]]>
</style>
-</head>
+</head_merge>
<pre>
<span class="comment-delimiter">/**</span><span class="comment">
@@ -17,7 +17,7 @@
<br >
<br >
The view code:
- <head>
+ <head_merge>
<style type="text/css">
<![CDATA[
.function-name {
@@ -38,7 +38,7 @@
}
]]>
</style>
- </head>
+ </head_merge>
<pre>
&lt;<span class="sgml-namespace">lift</span>:<span class="function-name">surround</span> <span class="variable-name">with</span>=<span class="string">"default"</span> <span class="variable-name">at</span>=<span class="string">"content"</span>&gt;
@@ -59,7 +59,7 @@
</pre>
The Snippet:
- <head>
+ <head_merge>
<style type="text/css">
<![CDATA[
@@ -93,7 +93,7 @@
}
]]>
</style>
- </head>
+ </head_merge>
<pre>
<span class="keyword">class</span> <span class="type">CountGame</span> <span class="keyword">extends</span> <span class="type">StatefulSnippet</span> {
@@ -22,7 +22,7 @@
part of the developer. Here's the code the implements the clock
that you see in this demo:
- <head>
+ <head_merge>
<style type="text/css">
/* <![CDATA[ */
.comment {
@@ -56,7 +56,7 @@
/* ]]> */
</style>
- </head>
+ </head_merge>
<pre>
<span class="keyword">class</span> <span class="type">Clock</span> <span class="keyword">extends</span> <span class="type">CometActor</span> {
@@ -1,7 +1,7 @@
<lift:surround with="default" at="content">
- <head>
+ <head_merge>
<script type="text/javascript" src="/scripts/jquery.blockUI.js"></script>
- </head>
+ </head_merge>
<span class="lift:JSDialog.button">
Destroy Rhode Island
</span>

0 comments on commit 2be671e

Please sign in to comment.