Updated code inherit from SHARED_HTML_ENCODER instead of creating new objects.
This commit is contained in:
@@ -10,6 +10,11 @@ note
|
||||
class
|
||||
WSF_FORM_FIELD_WITH_NUMERIC_ATTRIBUTE
|
||||
|
||||
inherit
|
||||
|
||||
SHARED_HTML_ENCODER
|
||||
|
||||
|
||||
feature -- Access
|
||||
|
||||
min: detachable READABLE_STRING_32
|
||||
@@ -80,21 +85,21 @@ feature {NONE} -- Conversion
|
||||
--min
|
||||
if attached min as l_min then
|
||||
a_target.append (" min=%"")
|
||||
a_target.append ((create {HTML_ENCODER}).encoded_string (l_min))
|
||||
a_target.append (html_encoder.encoded_string (l_min))
|
||||
a_target.append_character ('%"')
|
||||
end
|
||||
|
||||
--max
|
||||
if attached max as l_max then
|
||||
a_target.append (" max=%"")
|
||||
a_target.append ((create {HTML_ENCODER}).encoded_string (l_max))
|
||||
a_target.append (html_encoder.encoded_string (l_max))
|
||||
a_target.append_character ('%"')
|
||||
end
|
||||
|
||||
--step
|
||||
if attached step as l_step then
|
||||
a_target.append (" step=%"")
|
||||
a_target.append ((create {HTML_ENCODER}).encoded_string (l_step))
|
||||
a_target.append (html_encoder.encoded_string (l_step))
|
||||
a_target.append_character ('%"')
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
deferred class
|
||||
WSF_FORM_INPUT_WITH_HTML5
|
||||
|
||||
inherit
|
||||
|
||||
SHARED_HTML_ENCODER
|
||||
|
||||
feature -- Access
|
||||
|
||||
placeholder: detachable READABLE_STRING_32
|
||||
@@ -147,7 +151,7 @@ feature -- Conversion
|
||||
do
|
||||
if attached placeholder as l_placeholder then
|
||||
a_target.append (" placeholder=%"")
|
||||
a_target.append ((create {HTML_ENCODER}).encoded_string (l_placeholder))
|
||||
a_target.append (html_encoder.encoded_string (l_placeholder))
|
||||
a_target.append_character ('%"')
|
||||
end
|
||||
--TODO check how we can add xhtml5 support
|
||||
@@ -166,7 +170,7 @@ feature -- Conversion
|
||||
end
|
||||
if attached pattern as l_pattern then
|
||||
a_target.append (" pattern=%"")
|
||||
a_target.append ((create {HTML_ENCODER}).encoded_string (l_pattern))
|
||||
a_target.append ( html_encoder.encoded_string (l_pattern))
|
||||
a_target.append_character ('%"')
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user