Skip to content

Commit 4076024

Browse files
committed
Fix #88: Run asUnHtml only once when attributes are set.
1 parent 7fe9984 commit 4076024

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

packages/HTML.package/HtmlDOMNode.class/instance/attributes..st

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ attributes: anObject
33
"Set the value of attributes"
44

55
| cstr |
6-
7-
attributes := anObject.
6+
7+
attributes := Dictionary new.
8+
anObject keysAndValuesDo:
9+
[ :eachKey :eachValue | attributes at: eachKey put: eachValue asUnHtml].
810
id := (attributes at: 'id' ifAbsent: [nil]).
911
cstr := attributes at: 'class' ifAbsent: [nil].
1012
classes := cstr isNil ifTrue: [#()] ifFalse: [cstr findTokens: ' '].

packages/HTML.package/HtmlDOMNode.class/instance/attributes.st

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,4 @@ accessing
22
attributes
33
"Answer the value of attributes"
44

5-
attributes ifNil: [attributes:=Dictionary new].
6-
attributes keysAndValuesDo:
7-
[ :eachKey :eachValue | attributes at: eachKey put: eachValue asUnHtml].
8-
^ attributes
5+
^ attributes ifNil: [attributes:=Dictionary new]

packages/HTML.package/HtmlDOMNode.class/methodProperties.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"addToFormatter:" : "rs 5/18/2014 15:33:20.542",
99
"addToHtmlMorph:" : "rs 5/28/2014 12:40:28.418",
1010
"associatedForm" : "rs 5/29/2014 23:10:34.728",
11-
"attributes" : "SS 6/5/2014 11:32",
12-
"attributes:" : "rs 5/30/2014 16:40:08.186",
11+
"attributes" : "tb 11/30/2005 12:26",
12+
"attributes:" : "SS 6/7/2014 10:27",
1313
"childDTDTags" : "tb 12/1/2005 09:11",
1414
"childTags" : "tb 12/1/2005 09:12",
1515
"classes" : "tb 1/4/2006 13:52",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
265cd527-7860-4ed2-9ef0-84086c072947
1+
429e44ef-e21e-4f8a-9b16-0d1f975279c6

packages/HTML.package/monticello.meta/version.d/HTML-SS.74_429e44ef-e21e-4f8a-9b16-0d1f975279c6

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(name 'HTML-SS.74'message 'Run asUnHtml only once when attributes are set.'id '429e44ef-e21e-4f8a-9b16-0d1f975279c6'date '7 June 2014'time '10:29:46.122 am'author 'SS'ancestors ((id '265cd527-7860-4ed2-9ef0-84086c072947'))stepChildren ())

0 commit comments

Comments
 (0)