Revision: 3786
Author: ihab.awad
Date: Wed Oct  7 13:12:16 2009
Log: Fix a couple of build problems
http://codereview.appspot.com/129044

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.

[email protected]

http://code.google.com/p/google-caja/source/detail?r=3786

Modified:
 /trunk/build.xml
 /trunk/src/com/google/caja/plugin/BuildServiceImplementation.java
 /trunk/tests/com/google/caja/plugin/domita_test_untrusted.html

=======================================
--- /trunk/build.xml    Wed Oct  7 11:42:04 2009
+++ /trunk/build.xml    Wed Oct  7 13:12:16 2009
@@ -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>
=======================================
--- /trunk/src/com/google/caja/plugin/BuildServiceImplementation.java Tue Sep 15 06:10:08 2009 +++ /trunk/src/com/google/caja/plugin/BuildServiceImplementation.java Wed Oct 7 13:12:16 2009
@@ -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();
=======================================
--- /trunk/tests/com/google/caja/plugin/domita_test_untrusted.html Tue Sep 29 17:25:00 2009 +++ /trunk/tests/com/google/caja/plugin/domita_test_untrusted.html Wed Oct 7 13:12:16 2009
@@ -2866,11 +2866,12 @@
   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');
 });

Reply via email to