Commit f0342329 authored by alexpott's avatar alexpott
Browse files

Issue #2509448 by xjm: Further refactor use of SafeMarkup in HWLDFWordAccumulator

parent f03eba74
......@@ -33,12 +33,11 @@ class HWLDFWordAccumulator {
protected function _flushGroup($new_tag) {
if ($this->group !== '') {
if ($this->tag == 'mark') {
$format_string = '@original_line<span class="diffchange">@group</span>';
$this->line = SafeMarkup::format('@original_line<span class="diffchange">@group</span>', ['@original_line' => $this->line, '@group' => $this->group]);
}
else {
$format_string = '@original_line@group';
$this->line = SafeMarkup::format('@original_line@group', ['@original_line' => $this->line, '@group' => $this->group]);
}
$this->line = SafeMarkup::format($format_string, ['@original_line' => $this->line, '@group' => $this->group]);
}
$this->group = '';
$this->tag = $new_tag;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment