Merge branch 'stable-2.15' into stable-2.16

* stable-2.15:
  Update polymer-resin to 2.0.1
  Update SAFE_URL_PATTERN to support polymer-resin 2.x
  Use safe-types-behavior in common-test-setup
  Add safe types bridge to Resin

Change-Id: Ie05c945a69fe490f47f12d99734633f6c927b330
This commit is contained in:
David Pursehouse 2019-05-22 16:19:03 +09:00
commit a831ebe687
3 changed files with 5 additions and 3 deletions

View File

@ -1314,8 +1314,8 @@ bower_archive(
bower_archive(
name = "polymer-resin",
package = "polymer/polymer-resin",
sha1 = "5cb65081d461e710252a1ba1e671fe4c290356ef",
version = "1.2.8",
sha1 = "94c29926c20ea3a9b636f26b3e0d689ead8137e5",
version = "2.0.1",
)
bower_archive(

View File

@ -23,7 +23,7 @@ limitations under the License.
/** @polymerBehavior Gerrit.SafeTypes */
Gerrit.SafeTypes = {};
const SAFE_URL_PATTERN = /^(https?:\/\/|mailto:|\/|#)/i;
const SAFE_URL_PATTERN = /^(https?:\/\/|mailto:|[^:/?#]*(?:[/?#]|$))/i;
/**
* Wraps a string to be used as a URL. An error is thrown if the string cannot

View File

@ -18,6 +18,7 @@ limitations under the License.
<link rel="import"
href="../bower_components/polymer-resin/standalone/polymer-resin.html" />
<link rel="import" href="../behaviors/safe-types-behavior/safe-types-behavior.html">
<script>
security.polymer_resin.install({
allowedIdentifierPrefixes: [''],
@ -32,6 +33,7 @@ limitations under the License.
+ JSON.stringify(args));
}
},
safeTypesBridge: Gerrit.SafeTypes.safeTypesBridge,
});
</script>
<script>