mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
LibWeb: Fix typo in query of link element search params
Regressed in 21fe86d235
This commit is contained in:
parent
934340d845
commit
099a069b86
3 changed files with 9 additions and 1 deletions
1
Tests/LibWeb/Text/expected/link-element-search.txt
Normal file
1
Tests/LibWeb/Text/expected/link-element-search.txt
Normal file
|
@ -0,0 +1 @@
|
|||
?q=some:query
|
7
Tests/LibWeb/Text/input/link-element-search.html
Normal file
7
Tests/LibWeb/Text/input/link-element-search.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<a id="link-with-query" rel="search" href="https://serenityos.org/search?q=some:query"</a>
|
||||
<script src="include.js"></script>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
println(document.getElementById("link-with-query").search);
|
||||
}
|
||||
</script>
|
|
@ -330,7 +330,7 @@ DeprecatedString HTMLHyperlinkElementUtils::search() const
|
|||
// 2. Let url be this element's url.
|
||||
|
||||
// 3. If url is null, or url's query is either null or the empty string, return the empty string.
|
||||
if (!m_url.has_value() || m_url->query().has_value() || m_url->query()->is_empty())
|
||||
if (!m_url.has_value() || !m_url->query().has_value() || m_url->query()->is_empty())
|
||||
return DeprecatedString::empty();
|
||||
|
||||
// 4. Return "?", followed by url's query.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue