Skip to content

Commit 0f1a1b4

Browse files
committed
Code Refacting
1 parent 1702c55 commit 0f1a1b4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bluelight/scripts/plugin/hanging_protocols.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function createHaningProtocolsDIV(viewportNum = viewportNumber) {
3838
function addRow(container, type, text, content, name) {
3939
function htmlEntities(str) {
4040
if (str == undefined || str == null) str = "";
41-
return String(str).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace("\r\n", "<br/>").replace("\n", "<br/>");
41+
return String(str).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/\r\n/g, "<br/>").replace(/\n/g, "<br/>");
4242
}
4343

4444
var row = document.createElement("div");

bluelight/scripts/viewer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ VIEWPORT.putLabel2Element = function (element, image, viewportNum) {
5151
//依照dicom tags設定檔載入影像
5252
function htmlEntities(str) {
5353
if (str == undefined || str == null) str = "";
54-
return String(str).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace("\r\n", "<br/>").replace("\n", "<br/>");
54+
return String(str).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/\r\n/g, "<br/>").replace(/\n/g, "<br/>");
5555
}
5656

5757
for (var i = 0; i < DicomTags.LT.name.length; i++)

0 commit comments

Comments
 (0)