We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 796e63b commit ebacef3Copy full SHA for ebacef3
Libraries/LibHTML/DOM/Document.cpp
@@ -113,8 +113,11 @@ URL Document::complete_url(const String& string) const
113
FileSystemPath fspath(m_url.path());
114
StringBuilder builder;
115
builder.append('/');
116
+
117
+ bool document_url_ends_in_slash = m_url.path()[m_url.path().length() - 1] == '/';
118
119
for (int i = 0; i < fspath.parts().size(); ++i) {
- if (i == fspath.parts().size() - 1)
120
+ if (i == fspath.parts().size() - 1 && !document_url_ends_in_slash)
121
break;
122
builder.append(fspath.parts()[i]);
123
0 commit comments