mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:37:34 +00:00
AK: Replace URL::to_string() with new serialize() implementation
This commit is contained in:
parent
1c4854824b
commit
b7c6af0a04
2 changed files with 14 additions and 47 deletions
14
AK/URL.h
14
AK/URL.h
|
@ -77,15 +77,15 @@ public:
|
|||
|
||||
String path() const;
|
||||
String basename() const;
|
||||
String to_string() const;
|
||||
String to_string_encoded() const
|
||||
{
|
||||
return percent_encode(to_string(), PercentEncodeSet::EncodeURI);
|
||||
}
|
||||
|
||||
String serialize(ExcludeFragment = ExcludeFragment::No) const;
|
||||
String serialize_for_display() const;
|
||||
|
||||
String to_string() const { return serialize(); }
|
||||
String to_string_encoded() const { return serialize(); }
|
||||
|
||||
bool equals(const URL& other, ExcludeFragment = ExcludeFragment::No) const;
|
||||
|
||||
URL complete_url(const String&) const;
|
||||
|
||||
bool data_payload_is_base64() const { return m_data_payload_is_base64; }
|
||||
|
@ -108,7 +108,7 @@ public:
|
|||
{
|
||||
if (this == &other)
|
||||
return true;
|
||||
return to_string() == other.to_string();
|
||||
return equals(other, ExcludeFragment::No);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -151,7 +151,7 @@ template<>
|
|||
struct Formatter<URL> : Formatter<StringView> {
|
||||
void format(FormatBuilder& builder, const URL& value)
|
||||
{
|
||||
Formatter<StringView>::format(builder, value.to_string());
|
||||
Formatter<StringView>::format(builder, value.serialize());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue