salesforce / secure-filters

Anti-XSS Security Filters for EJS and More
BSD 3-Clause "New" or "Revised" License
139 stars 39 forks source link

Implement `object` filter #1

Closed stash closed 11 years ago

stash commented 11 years ago

Doing

<script>
  var config = <%-: config | object %>;
</script>

Will inline an object (JSON), but with <> escaped to \u003C and \u003E to prevent breaking out of the <script> context.

("object" is just one name this could take... jsObj maybe? jsConst?)

stash commented 11 years ago

Estimate 1/2 day