Reviewers: MikeSamuel,

Description:
1. Fix r3784 where the additional 3pty jars were not being copied into
ant-libs/ by the build file.

2. Fix the following issue:

  http://code.google.com/p/google-caja/issues/detail?id=1134

by changing the default PluginEnvironment of the build service to
rewrite URIs to point to "example.com", which is an RFC-reserved
domain that will never resolve to anything.

Please review this at http://codereview.appspot.com/129044

Affected files:
  M     build.xml
  M     src/com/google/caja/plugin/BuildServiceImplementation.java
  M     tests/com/google/caja/plugin/domita_test_untrusted.html


Index: tests/com/google/caja/plugin/domita_test_untrusted.html
===================================================================
--- tests/com/google/caja/plugin/domita_test_untrusted.html     (revision 3784)
+++ tests/com/google/caja/plugin/domita_test_untrusted.html     (working copy)
@@ -2866,11 +2866,11 @@
   assertEquals(
       (''
        + '<map name="foo-xyz___">'
- + '<area href="http://proxy/?mime-type=*%2F*&amp;uri=areatarget.html";' + + '<area href="http://example.com/?mime-type=*%2F*&amp;uri=areatarget.html";'
        + ' target="_blank">'
        + '</map>'
        + '<img usemap="#foo-xyz___"'
-       + ' src="http://proxy/?mime-type=image%2F*&amp;uri=mappic.gif";>'),
+ + ' src="http://example.com/?mime-type=image%2F*&amp;uri=mappic.gif";>'),
       directAccess.getInnerHTML(document.getElementById('test-usemap')));
   pass('test-usemap');
 });
Index: src/com/google/caja/plugin/BuildServiceImplementation.java
===================================================================
--- src/com/google/caja/plugin/BuildServiceImplementation.java (revision 3784) +++ src/com/google/caja/plugin/BuildServiceImplementation.java (working copy)
@@ -121,8 +121,10 @@

         public String rewriteUri(ExternalReference uri, String mimeType) {
           try {
+ // TODO(ihab.awad): Need to pass in the URI rewriter from the build
+            // file somehow (as a Cajita program?). The below is a stub.
             return URI.create(
-                "http://proxy/";
+                "http://example.com/";
                 + "?mime-type=" + URLEncoder.encode(mimeType, "UTF-8")
                 + "&uri=" + URLEncoder.encode("" + uri.getUri(), "UTF-8"))
                 .toString();
Index: build.xml
===================================================================
--- build.xml   (revision 3784)
+++ build.xml   (working copy)
@@ -367,6 +367,12 @@
       <fileset dir="${third_party}/java/htmlparser">
         <include name="htmlparser.jar"/>
       </fileset>
+      <fileset dir="${third_party}/java/jaf">
+        <include name="activation.jar"/>
+      </fileset>
+      <fileset dir="${third_party}/java/javamail">
+        <include name="mail.jar"/>
+      </fileset>
       <fileset dir="${third_party}/java/json_simple">
         <include name="json_simple.jar"/>
       </fileset>


Reply via email to