Well that stinks.  Seems like a warning would suffice, allowing those that 
did it on purpose to be able to do it and those who did it on accident to 
fix it.
Is there somethinng that can be done to allow us to do this?   Maybe 
another class that is both a SafeHtml and SafeUri that can be used in both 
places?

On Monday, April 23, 2012 3:22:04 PM UTC-4, Thomas Broyer wrote:

>
>
> On Monday, April 23, 2012 7:25:59 PM UTC+2, Patrick Tucker wrote:
>>
>> We have a template that we are converting to using SafeHtml and SafeUri, 
>> but ran into a problem.
>>  
>> The template looks something like this:
>> <a href="{0}" ...>{0}</a>
>>  
>> Argument 0 is the URL, if we change the value from String to SafeUri we 
>> get the following error:
>> [ERROR] SafeUri can only be used as the entire value of a URL attribute. 
>> Did you mean to use java.lang.String or SafeHtml instead?
>>  
>> The only way around this is to keep the argument a String or add another 
>> argument that is a SafeHtml of the URL.  Neither of these options seems 
>> ideal to me.
>>  
>> Thoughts?  I don't see any reason why a valid URL can not be considered 
>> SafeHtml?
>>
>
> See comments in http://gwt-code-reviews.appspot.com/1447812
> John thought that using SafeUri outside a URL attribute would likely be a 
> dev mistake; so the solution really is to add another argument to your 
> SafeHtmlTemplates method. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Uyijn6tCkPYJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to