mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 01:29:17 +00:00
LibWebView: Handle missing URL for view source
Instead of potentially passing through an invalid URL.
This commit is contained in:
parent
f857c6a6e6
commit
2827374edc
Notes:
github-actions[bot]
2025-03-04 21:26:39 +00:00
Author: https://github.com/shannonbooth
Commit: 2827374edc
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3668
Reviewed-by: https://github.com/trflynn89
3 changed files with 12 additions and 7 deletions
|
@ -52,7 +52,7 @@ public:
|
|||
SourceHighlighterClient(String const& source, Syntax::Language);
|
||||
virtual ~SourceHighlighterClient() = default;
|
||||
|
||||
String to_html_string(URL::URL const& url, URL::URL const& base_url, HighlightOutputMode) const;
|
||||
String to_html_string(Optional<URL::URL> const&, URL::URL const& base_url, HighlightOutputMode) const;
|
||||
|
||||
private:
|
||||
// ^ Syntax::HighlighterClient
|
||||
|
@ -75,7 +75,7 @@ private:
|
|||
OwnPtr<Syntax::Highlighter> m_highlighter;
|
||||
};
|
||||
|
||||
String highlight_source(URL::URL const& url, URL::URL const& base_url, String const& source, Syntax::Language, HighlightOutputMode);
|
||||
String highlight_source(Optional<URL::URL> const&, URL::URL const& base_url, String const& source, Syntax::Language, HighlightOutputMode);
|
||||
|
||||
constexpr inline StringView HTML_HIGHLIGHTER_STYLE = R"~~~(
|
||||
@media (prefers-color-scheme: dark) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue