Rewrite relative action URLS

Fixes #5701
This commit is contained in:
Berin Larson 2019-02-26 13:41:06 +05:30 committed by Bjørn Erik Pedersen
parent 075b17ee1d
commit c154c2f7b2
2 changed files with 3 additions and 2 deletions

View file

@ -49,6 +49,7 @@ func newPrefixState() []*prefix {
return []*prefix{
{b: []byte("src="), f: checkCandidateBase},
{b: []byte("href="), f: checkCandidateBase},
{b: []byte("action="), f: checkCandidateBase},
{b: []byte("srcset="), f: checkCandidateSrcset},
}
}

View file

@ -89,8 +89,8 @@ schemaless: <img srcset='//img.jpg' src='//basic.jpg'>
schemaless2: <img srcset="//img.jpg" src="//basic.jpg2> POST
`
relPathVariations = `PRE. a href="/img/small.jpg" POST.`
relPathVariationsCorrect = `PRE. a href="../../img/small.jpg" POST.`
relPathVariations = `PRE. a href="/img/small.jpg" input action="/foo.html" POST.`
relPathVariationsCorrect = `PRE. a href="../../img/small.jpg" input action="../../foo.html" POST.`
testBaseURL = "http://base/"
)