Stop! This text is only interesting for you if you...
- Like popping alerts in weird situations
- Miss CSS expressions as much as we do
- Have an unhealthy obsession for markup porn
<?php | |
/** | |
* XSS protection function for HTML context only | |
* @usecases | |
* <title>use this function if output reflects here or as a content of any HTML tag.</title> | |
* e.g., <span>use this function if output reflects here</span> | |
* e.g., <div>use this function if output reflects here</div> | |
* @description | |
* Sanitize/Filter < and > so that attacker can not leverage them for JavaScript execution. |
This very simple and minimal tutorial documents in a few easy steps how to play with WebAssembly (WASM) and get first results within minutes.
While the code below is mostly useless, it will show, how to call the alert
function from within a WASM file and thus demonstrate how to import and export DOM objects.
Of course, this exercise has no real use. It is just meant to show, that getting started with WASM isn't hard. And there is no need for a complex build-chain, tons of tools or a dedicated VMs. Just use a browser, one online tool and that's it.
Mozilla Firefox supports a feature that allows to define SVG images inside an OTF font to represent characters. This is useful if we for example want to work with colorful characters, Emoji, animated characters and so on. Firefox is currently the only relevant browser supporting this technology.
The general technology and its advantages are described here:
I hereby claim:
To claim this, I am signing this object: