IhtmlMessageType.MALFORMED_URI, pos,
MessagePart.Factory.valueOf(value));
return noResult(attr);
}
if (meta.getUriPolicy() != null) {
ExternalReference ref = new ExternalReference(uri, pos);
String rewrittenUri = UriPolicyNanny.apply(
meta.getUriPolicy(),
ref, attr.attrInfo.getUriEffect(),
attr.attrInfo.getLoaderType(),
Collections.singletonMap(
UriPolicyHintKey.XML_ATTR.key,
attr.attrInfo.getKey().toString()));
if (rewrittenUri == null) {
mq.addMessage(
PluginMessageType.DISALLOWED_URI, pos,
MessagePart.Factory.valueOf(uri.toString()));
return noResult(attr);
}
dynamicValue = StringLiteral.valueOf(
ref.getReferencePosition(), rewrittenUri);
} else {
dynamicValue = (Expression) QuasiBuilder.substV(
""
+ "IMPORTS___./*@synthetic*/rewriteUriInAttribute___("
+ " @value, @tagName, @attribName)",