Comment #3 on issue 1071 by ihab.awad: Cajoler resolves embedded URIs too early
http://code.google.com/p/google-caja/issues/detail?id=1071

Ok, I see it now:

  ---

Is it the responsibility of the policy or the caller to resolve relative URLs?

The caller. Only the caller has enough information to resolve URLs correctly. E.g., the HTML rewriter will want to resolve URLs relative to the input HTML's source or <base href>, pass the URL to the policy, and then relativize the URL against the URL
the gadget will be served under.

  ---

To paraphrase, my understanding of this is: "Because of <BASE HREF> tags, the HTML rewriter must do the resolution of relative URLs before handing off to the policy." Currently, TemplateCompiler does not do anything with <BASE HREF>, so we have to
change something one way or the other....

The question is: Is this a special case for HTML, or is it a general case? One solution could be to pass to the URI policy a more detailed ExternalReference, e.g.,
one which contains:

   1. The FilePosition of the reference (already present)
   2. The URI value of the reference (already present)
   3. The base URI to use (new field)

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

Reply via email to