inline_images.unit 733 B

1234567891011121314151617181920212223242526272829
  1. >>> image
  2. ![](http://foo.com/foo.png)
  3. <<<
  4. <p><img src="http://foo.com/foo.png" alt="" /></p>
  5. >>> alternate text
  6. ![alternate text](http://foo.com/foo.png)
  7. <<<
  8. <p><img src="http://foo.com/foo.png" alt="alternate text" /></p>
  9. >>> title
  10. ![](http://foo.com/foo.png "optional title")
  11. <<<
  12. <p><img src="http://foo.com/foo.png" alt="" title="optional title" /></p>
  13. >>> invalid alt text
  14. ![`alt`](http://foo.com/foo.png)
  15. <<<
  16. <p><img src="http://foo.com/foo.png" alt="alt" /></p>
  17. >>> XSS
  18. ![Uh oh...]("onerror="alert('XSS'))
  19. <<<
  20. <p><img src="%22onerror=%22alert('XSS')" alt="Uh oh..." /></p>
  21. >>> URL-escaping should be left alone inside the destination
  22. ![](https://example/foo%2Fvar)
  23. <<<
  24. <p><img src="https://example/foo%2Fvar" alt="" /></p>