mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-19 08:39:34 +00:00
Only escape previously unescaped percentage signs
This commit is contained in:
parent
36c7e5e8c6
commit
02409f467a
1 changed files with 1 additions and 1 deletions
|
|
@ -450,7 +450,7 @@ abstract class AbstractParameter extends AbstractNamedDBElement implements Uniqu
|
|||
$unit = $this->unit;
|
||||
} else {
|
||||
//Escape the percentage sign for convenience (as latex uses it as comment and it is often used in units)
|
||||
$escaped = preg_replace('/(\%)/', "\\\\$1", $this->unit);
|
||||
$escaped = preg_replace('/([^\\\\]?%)/', "\\\\$1", $this->unit);
|
||||
|
||||
$unit = '$\mathrm{'.$escaped.'}$';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue