Author: tyrell
Date: Sun Feb 3 08:41:30 2008
New Revision: 13236
Log:
Removing custom formatting function and using the internal javascript function
escape instead.
Modified:
trunk/mashup/java/modules/samples/tomatoTube/tomatoTube.js
Modified: trunk/mashup/java/modules/samples/tomatoTube/tomatoTube.js
==============================================================================
--- trunk/mashup/java/modules/samples/tomatoTube/tomatoTube.js (original)
+++ trunk/mashup/java/modules/samples/tomatoTube/tomatoTube.js Sun Feb 3
08:41:30 2008
@@ -112,9 +112,9 @@
var movieName = "";
if (tempArray.length > 1) {
- movieName = format(tempArray[1]);
+ movieName = escape(tempArray[1]);
} else {
- movieName = format(tempArray[0]);
+ movieName = escape(tempArray[0]);
}
@@ -190,9 +190,6 @@
findTrailer.outputType = "String";
function findTrailer(moviename)
{
- //Formatting the movie name
- moviename = format(moviename);
-
//Creating the query string we are using RSS 2.0 to retrieve a list of
trailers.
var query = "http://gdata.youtube.com/feeds/videos?vq=" + moviename +
"%20trailer&start-index=1&max-results=5&orderby=relevance&alt=rss";
@@ -229,15 +226,6 @@
}
-format.visible = false;
-function format(string)
-{
- string = string.replace(/^\s+|\s+$/g, "");
- string = string.replace(/\s+/g, "%20");
-
- return string;
-}
-
startPeriodicRefresh.visible = false;
function startPeriodicRefresh(mode, startNow)
{
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev