You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Paul Lindner (JIRA)" <ji...@apache.org> on 2009/07/14 01:32:14 UTC

[jira] Commented: (SHINDIG-346) Implement gadgets.util.sanitizeHtml

    [ https://issues.apache.org/jira/browse/SHINDIG-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12730591#action_12730591 ] 

Paul Lindner commented on SHINDIG-346:
--------------------------------------

How about this?

diff --git a/php/src/gadgets/GadgetFeatureRegistry.php b/php/src/gadgets/GadgetFeatureRegistry.php
index 0f77901..f8c10e7 100644
--- a/php/src/gadgets/GadgetFeatureRegistry.php
+++ b/php/src/gadgets/GadgetFeatureRegistry.php
@@ -208,6 +208,12 @@ class GadgetFeatureRegistry {
         $content = (string)$script;
       } else {
         $content = trim($attributes['src']);
+
+        // Make html-santitization work.
+        if ($content == 'res://com/google/caja/plugin/html-sanitizer.js') {
+          $content= 'http://google-caja.googlecode.com/svn/trunk/src/com/google/caja/plugin/html-sanitizer.js';
+        }
+
         if (strtolower(substr($content, 0, strlen("http://"))) == "http://" || strtolower(substr($content, 0, strlen("https://"))) == "https://") {
           $type = 'URL';
         } else {


> Implement gadgets.util.sanitizeHtml
> -----------------------------------
>
>                 Key: SHINDIG-346
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-346
>             Project: Shindig
>          Issue Type: Sub-task
>          Components: Javascript 
>            Reporter: Kevin Brown
>            Assignee: Brian Eaton
>         Attachments: fix-346-bug.patch, split-sanitizer-and-domita-minified.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.