Skip to content

Commit

Permalink
webui: quote strings with slashes in media details view
Browse files Browse the repository at this point in the history
(cherry picked from commit a3fd053)

Fixes #1235: Special characters not escaped in translations
  • Loading branch information
gnieark authored and fbergkemper committed Aug 3, 2021
1 parent 680c9e7 commit 3a56372
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions webui/module/Media/view/media/media/details.phtml
Expand Up @@ -274,119 +274,119 @@ $this->headTitle($title);
html.push('<div class="container-fluid">');
html.push('<table class="table table-bordered">');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Label date"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Label date")); ?></th>');
html.push('<td>' + row.labeldate + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("First written"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("First written")); ?></th>');
html.push('<td>' + row.firstwritten + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Last written"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Last written")); ?></th>');
html.push('<td>' + row.lastwritten + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Volume jobs"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Volume jobs")); ?></th>');
html.push('<td>' + row.voljobs + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Recycle"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Recycle")); ?></th>');
html.push('<td>' + r + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Volume writes"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Volume writes")); ?></th>');
html.push('<td>' + row.volwrites + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Slot"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Slot")); ?></th>');
html.push('<td>' + row.slot + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Media Id"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Media Id")); ?></th>');
html.push('<td>' + row.mediaid + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Volume Blocks"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Volume Blocks")); ?></th>');
html.push('<td>' + row.volblocks + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Volume use duration"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Volume use duration")); ?></th>');
html.push('<td>' + row.voluseduration + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Volume Pool Id"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Volume Pool Id")); ?></th>');
html.push('<td>' + row.poolid + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("In changer"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("In changer")); ?></th>');
html.push('<td>' + row.inchanger + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Volume Files"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Volume Files")); ?></th>');
html.push('<td>' + row.volfiles + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Max. volume jobs"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Max. volume jobs")); ?></th>');
html.push('<td>' + row.maxvoljobs + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Volume mounts"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Volume mounts")); ?></th>');
html.push('<td>' + row.volmounts + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Volume capacity bytes"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Volume capacity bytes")); ?></th>');
html.push('<td>' + row.volcapacitybytes + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Volume errors"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Volume errors")); ?></th>');
html.push('<td>' + row.volerrors + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Enabled"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Enabled")); ?></th>');
html.push('<td>' + row.enabled + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Max. volume files"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Max. volume files")); ?></th>');
html.push('<td>' + row.maxvolfiles + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Endfile"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Endfile")); ?></th>');
html.push('<td>' + row.endfile + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Endblock"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Endblock")); ?></th>');
html.push('<td>' + row.endblock + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Labeltype"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Labeltype")); ?></th>');
html.push('<td>' + row.labeltype + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Device Id"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Device Id")); ?></th>');
html.push('<td>' + row.deviceid + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Location Id"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Location Id")); ?></th>');
html.push('<td>' + row.locationid + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Recycle count"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Recycle count")); ?></th>');
html.push('<td>' + row.recyclecount + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Initial write"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Initial write")); ?></th>');
html.push('<td>' + row.initialwrite + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Scratch Pool Id"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Scratch Pool Id")); ?></th>');
html.push('<td>' + row.scratchpoolid + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Recycle Pool Id"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Recycle Pool Id")); ?></th>');
html.push('<td>' + row.recyclepoolid + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo $this->translate("Comment"); ?></th>');
html.push('<th><?php echo addslashes($this->translate("Comment")); ?></th>');
html.push('<td>' + row.comment + '</td>');
html.push('</tr>');
html.push('</table>');
Expand Down

0 comments on commit 3a56372

Please sign in to comment.