Browser: Use format functions instead of printf.

This commit is contained in:
asynts 2020-10-04 12:39:02 +02:00 committed by Andreas Kling
commit 616af36d91
Notes: sideshowbarker 2024-07-19 02:04:39 +09:00
6 changed files with 19 additions and 18 deletions

View file

@ -91,7 +91,7 @@ ConsoleWidget::ConsoleWidget()
auto error = parser.errors()[0];
auto hint = error.source_location_hint(js_source);
if (!hint.is_empty())
output_html.append(String::format("<pre>%s</pre>", escape_html_entities(hint).characters()));
output_html.append(String::formatted("<pre>{}</pre>", escape_html_entities(hint)));
m_interpreter->vm().throw_exception<JS::SyntaxError>(m_interpreter->global_object(), error.to_string());
} else {
m_interpreter->run(m_interpreter->global_object(), *program);