mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
Meta+LibURL: Always enable public suffix data
We should not encourage no public suffix data as a supported configuration.
This commit is contained in:
parent
9e7b40747f
commit
c3618b891f
Notes:
github-actions[bot]
2025-06-29 11:49:22 +00:00
Author: https://github.com/shannonbooth
Commit: c3618b891f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5242
Reviewed-by: https://github.com/tcl3 ✅
4 changed files with 24 additions and 42 deletions
|
@ -14,12 +14,9 @@
|
|||
#include <AK/StringBuilder.h>
|
||||
#include <AK/Utf8View.h>
|
||||
#include <LibURL/Parser.h>
|
||||
#include <LibURL/PublicSuffixData.h>
|
||||
#include <LibURL/URL.h>
|
||||
|
||||
#if defined(ENABLE_PUBLIC_SUFFIX)
|
||||
# include <LibURL/PublicSuffixData.h>
|
||||
#endif
|
||||
|
||||
namespace URL {
|
||||
|
||||
Optional<URL> URL::complete_url(StringView relative_url) const
|
||||
|
@ -494,22 +491,14 @@ ByteString percent_decode(StringView input)
|
|||
return builder.to_byte_string();
|
||||
}
|
||||
|
||||
bool is_public_suffix([[maybe_unused]] StringView host)
|
||||
bool is_public_suffix(StringView host)
|
||||
{
|
||||
#if defined(ENABLE_PUBLIC_SUFFIX)
|
||||
return PublicSuffixData::the()->is_public_suffix(host);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
Optional<String> get_public_suffix([[maybe_unused]] StringView host)
|
||||
Optional<String> get_public_suffix(StringView host)
|
||||
{
|
||||
#if defined(ENABLE_PUBLIC_SUFFIX)
|
||||
return MUST(PublicSuffixData::the()->get_public_suffix(host));
|
||||
#else
|
||||
return {};
|
||||
#endif
|
||||
}
|
||||
|
||||
// https://github.com/publicsuffix/list/wiki/Format#algorithm
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue