Reviewers: felix8a,

Description:
Fix tag policy typing in CSS sanitizer.

Please review this at https://codereview.appspot.com/287060043/

Affected files (+5, -3 lines):
  M src/com/google/caja/plugin/html-sanitizer.js
  M src/com/google/caja/plugin/sanitizecss.js


Index: src/com/google/caja/plugin/html-sanitizer.js
diff --git a/src/com/google/caja/plugin/html-sanitizer.js b/src/com/google/caja/plugin/html-sanitizer.js index 7995b085363630970935870e546ddfcbd5ef405b..590cb86dc92f3cebc948e92a319a104cf5607a2c 100644
--- a/src/com/google/caja/plugin/html-sanitizer.js
+++ b/src/com/google/caja/plugin/html-sanitizer.js
@@ -30,12 +30,14 @@
  * @author [email protected]
  * \@requires html4, URI
  * \@overrides window
- * \@provides html, html_sanitize
+ * \@provides html, html_sanitize, defs
  */

 // The Turkish i seems to be a non-issue, but abort in case it is.
 if ('I'.toLowerCase() !== 'i') { throw 'I/i problem'; }

+// TODO(kpreid): Refactor so there is no global introduced by these type
+// definitions.

 /**
  * Contains types related to sanitizer policies.
Index: src/com/google/caja/plugin/sanitizecss.js
diff --git a/src/com/google/caja/plugin/sanitizecss.js b/src/com/google/caja/plugin/sanitizecss.js index 89d99ac10e17a1f10d449915626c71d084ae3405..9edc65b50a2c99872b58d446aa722efb5c5915d6 100644
--- a/src/com/google/caja/plugin/sanitizecss.js
+++ b/src/com/google/caja/plugin/sanitizecss.js
@@ -388,7 +388,7 @@ var sanitizeMediaQuery = undefined;
    * @param {{
    *     containerClass: ?string,
    *     idSuffix: string,
-   *     tagPolicy: function(string, Array.<string>): ?Array.<string>,
+   *     tagPolicy: defs.TagPolicy,
    *     virtualizeAttrName: ?function(string, string): ?string
    *   }} virtualization An object like <pre<{
* containerClass: class name prepended to all selectors to scope them (if
@@ -794,7 +794,7 @@ var sanitizeMediaQuery = undefined;
      * @param {{
      *     containerClass: ?string,
      *     idSuffix: string,
-     *     tagPolicy: function(string, Array.<string>): ?Array.<string>,
+     *     tagPolicy: defs.TagPolicy,
      *     virtualizeAttrName: ?function(string, string): ?string
      *   }} virtualization An object like <pre<{
* containerClass: class name prepended to all selectors to scope them (if


--

--- You received this message because you are subscribed to the Google Groups "Google Caja Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to