mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
Browser+Ladybird+LibWeb: Port content filters to String
This commit is contained in:
parent
76ae60da15
commit
5089766af6
11 changed files with 23 additions and 22 deletions
|
@ -126,14 +126,15 @@ static ErrorOr<void> load_content_filters()
|
|||
auto ad_filter_list = TRY(Core::BufferedFile::create(move(file)));
|
||||
auto buffer = TRY(ByteBuffer::create_uninitialized(4096));
|
||||
|
||||
Vector<DeprecatedString> patterns;
|
||||
Vector<String> patterns;
|
||||
|
||||
while (TRY(ad_filter_list->can_read_line())) {
|
||||
auto line = TRY(ad_filter_list->read_line(buffer));
|
||||
if (line.is_empty())
|
||||
continue;
|
||||
|
||||
TRY(patterns.try_append(line));
|
||||
auto pattern = TRY(String::from_utf8(line));
|
||||
TRY(patterns.try_append(move(pattern)));
|
||||
}
|
||||
|
||||
auto& content_filter = Web::ContentFilter::the();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue