Skip to content
Open
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8d3840c
errorCode200 Хакатон $mol
dukinm Mar 2, 2025
73787d3
errorCode200 Хакатон $mol
dukinm Mar 2, 2025
46313ec
errorCode200 Хакатон $mol
dukinm Mar 2, 2025
bb2abcb
errorCode200 Хакатон $mol
dukinm Mar 2, 2025
ba12891
errorCode200 Хакатон $mol
dukinm Mar 2, 2025
eb83768
errorCode200 Хакатон $mol
dukinm Mar 2, 2025
d01071e
errorCode200 Хакатон $mol
dukinm Mar 2, 2025
07f03e7
errorCode200 Хакатон $mol
dukinm Mar 2, 2025
ce96655
errorCode200 Хакатон $mol
dukinm Mar 2, 2025
ad3a0c3
errorCode200 Хакатон $mol
dukinm Mar 2, 2025
103cda4
errorCode200 Хакатон $mol
dukinm Mar 2, 2025
eef5526
errorCode200 Хакатон $mol
dukinm Mar 3, 2025
2244f37
errorCode200 Хакатон $mol
dukinm Mar 3, 2025
0774bfc
errorCode200 Хакатон $mol
dukinm Mar 3, 2025
d1c1760
errorCode200 Хакатон $mol
dukinm Mar 3, 2025
a565502
errorCode200 Хакатон $mol
dukinm Mar 8, 2025
f0a6120
errorCode200 Хакатон $mol
dukinm Mar 8, 2025
9cb73d4
errorCode200 Хакатон $mol
dukinm Mar 8, 2025
f740ea7
errorCode200 Хакатон $mol
dukinm Mar 8, 2025
7526a8c
errorCode200 Хакатон $mol
dukinm Mar 8, 2025
19b6bb1
errorCode200 Хакатон $mol
dukinm Mar 8, 2025
4b4e55e
errorCode200 Хакатон $mol
dukinm Mar 8, 2025
dc4ec60
errorCode200 Хакатон $mol
dukinm Mar 8, 2025
64424f7
errorCode200 Хакатон $mol
dukinm Mar 8, 2025
6570d25
errorCode200 Хакатон $mol
dukinm Mar 8, 2025
8d5e9e0
errorCode200 Хакатон $mol
dukinm Mar 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion optimade_zero/optimade_zero.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace $.$$ {
emptyValue?: string;
}


export class $optimade_zero extends $.$optimade_zero {

@ $mol_mem
Expand Down Expand Up @@ -75,7 +76,12 @@ namespace $.$$ {
}

item_html( obj: $optimade_zero_entry ) {
return `<div>${ obj.formula_html() }</div>`
const safe_html=obj.formula_html().replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#39;');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$mol_html_encode

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mol_html_encode не подойдет, но и свое решение я тогда заменил - там нужно sup, sub теги оставлять - так как они влияют на отображение чисел в формулах

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В любом случае работа с сырым html - не очень безопасная штука.

return `<div>${ safe_html }</div>`
}

item_property( obj: $optimade_zero_entry ) {
Expand Down