mirror of
https://github.com/flarum/core.git
synced 2025-07-31 13:40:20 +02:00
fix: html entities shown raw in page title (#3542)
This commit is contained in:
@@ -414,7 +414,12 @@ export default class Application {
|
||||
onHomepage || !this.title
|
||||
? extractText(app.translator.trans('core.lib.meta_titles.without_page_title', params))
|
||||
: extractText(app.translator.trans('core.lib.meta_titles.with_page_title', params));
|
||||
document.title = count + title;
|
||||
|
||||
const tempEl = document.createElement('div');
|
||||
tempEl.innerHTML = title;
|
||||
const decodedTitle = tempEl.innerText;
|
||||
|
||||
document.title = count + decodedTitle;
|
||||
}
|
||||
|
||||
protected transformRequestOptions<ResponseType>(flarumOptions: FlarumRequestOptions<ResponseType>): InternalFlarumRequestOptions<ResponseType> {
|
||||
|
@@ -3,7 +3,7 @@
|
||||
@if ($language) lang="{{ $language }}" @endif>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ $title }}</title>
|
||||
<title>{!! $title !!}</title>
|
||||
|
||||
{!! $head !!}
|
||||
</head>
|
||||
|
Reference in New Issue
Block a user