سؤال

Is it possible to use GWT's SafeHTML templates to define an activeXControl? If I don't use the SafeHTML mechanism, it all works fine....however if I try to use SafeHTML it replaces my input classid with a "#".

Is SafeHTML blocking the use of classid?

Thanks!

هل كانت مفيدة؟

المحلول

SafeHtml sanitizes URLs that you try to "inject" into attributes that it knows are of type URL. This sanitization only accepts HTTP, HTTPS, FTP and MAILTO.

You can use other URLs but you have to explicitly say they're safe to use, by passing them as SafeUri instances. You'll create such instances using UriUtils.fromTrustedString or UriUtils.fromSafeConstant.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top