6174 / 6174/pagedown

Markdown.Sanitizer removes <a href= and <img src= tags referencing relative paths

Aperta
#80 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
auto-migrated Priority-Medium Type-Defect
Lingua principale
JavaScript
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

```
The part
(https?:\/\/|\/)
in Markdown.Sanitizer var img_white only allows full URLs:
http://... or https://...
or in-site URLs relative to the root
/...

As a consequence, the markdown code
![buttons](js/pagedown/wmd-buttons.png)"

producing the html code

buttons

is removed by Markdown.Sanitizer, because the in-site URL is relative to the
current path.

The same applies to var a_white

Solution:
Add an extra ? as follows:
(https?:\/\/|\/?)

```

Original issue reported on code.google.com by `geet...@yahoo.co.uk` on 9 Oct 2014 at 12:44

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.