mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-20 00:59:34 +00:00
Render the percentage sign correctly in units in the frontend.
This commit is contained in:
parent
8d410c8a57
commit
39b0e85028
2 changed files with 7 additions and 2 deletions
|
|
@ -33,7 +33,10 @@ export default class extends Controller {
|
|||
{
|
||||
let value = "";
|
||||
if (this.unitValue) {
|
||||
value = "\\mathrm{" + this.inputTarget.value + "}";
|
||||
//Escape percentage signs
|
||||
value = this.inputTarget.value.replace(/%/g, '\\%');
|
||||
|
||||
value = "\\mathrm{" + value + "}";
|
||||
} else {
|
||||
value = this.inputTarget.value;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue