diff --git a/Website/SourceCode/Profiles/Profiles/Profile/Modules/CustomViewUCSFPlugins/UCSFFeaturedVideos.ascx.cs b/Website/SourceCode/Profiles/Profiles/Profile/Modules/CustomViewUCSFPlugins/UCSFFeaturedVideos.ascx.cs index 979ebf2b..54acbe91 100644 --- a/Website/SourceCode/Profiles/Profiles/Profile/Modules/CustomViewUCSFPlugins/UCSFFeaturedVideos.ascx.cs +++ b/Website/SourceCode/Profiles/Profiles/Profile/Modules/CustomViewUCSFPlugins/UCSFFeaturedVideos.ascx.cs @@ -2,6 +2,7 @@ using Profiles.Framework.Utilities; using System.Xml; using System.Collections.Generic; +using System.Web; using System.Web.UI.HtmlControls; namespace Profiles.Profile.Modules.CustomViewUCSFPlugins @@ -42,7 +43,7 @@ private void LoadAssets() //litjs.Text = base.SocialMediaInit(this.PlugInName); //TODO Obviously change this //litjs.Text = base.jsStart + "FeaturedVideos.init('" + Profiles.Framework.Utilities.GenericRDFDataIO.GetSocialMediaPlugInData(this.SubjectID, "UCSFFeaturedVideos").Replace("'", "\\'") + "'); " + base.jsEnd; - litjs.Text = base.jsStart + "FeaturedVideos.init('" + Profiles.Framework.Utilities.GenericRDFDataIO.GetSocialMediaPlugInData(this.SubjectID, "UCSFFeaturedVideos").Replace("\\", "\\\\").Replace("'", "\\'") + "'); " + base.jsEnd; + litjs.Text = base.jsStart + "FeaturedVideos.init('" + HttpUtility.JavaScriptStringEncode(Profiles.Framework.Utilities.GenericRDFDataIO.GetSocialMediaPlugInData(this.SubjectID, "UCSFFeaturedVideos")) + "'); " + base.jsEnd; HtmlLink Displaycss = new HtmlLink(); @@ -55,4 +56,4 @@ private void LoadAssets() } } -} \ No newline at end of file +} diff --git a/Website/SourceCode/Profiles/Profiles/Profile/Modules/CustomViewUCSFPlugins/UCSFFeaturedVideos.js b/Website/SourceCode/Profiles/Profiles/Profile/Modules/CustomViewUCSFPlugins/UCSFFeaturedVideos.js index 79e42d3f..4ce836e8 100644 --- a/Website/SourceCode/Profiles/Profiles/Profile/Modules/CustomViewUCSFPlugins/UCSFFeaturedVideos.js +++ b/Website/SourceCode/Profiles/Profiles/Profile/Modules/CustomViewUCSFPlugins/UCSFFeaturedVideos.js @@ -30,7 +30,7 @@ FeaturedVideos.getVideoMetadata = function (video, max_height, max_width, callba var oembedURL = oEmbedURLBase + '?maxheight=' + max_height + '&maxwidth=' + max_width + '&url=' + encodeURIComponent(video.url); var req = $.ajax({ url: oembedURL, - dataType: "jsonp", + dataType: "json", timeout: 10000, success: callback });