Skip to content

Commit 4065efb

Browse files
committed
COLDBOX-718 #resolve
Left one encodeforhtml in textarea that was missing.
1 parent 6c59ad2 commit 4065efb

File tree

1 file changed

+36
-13
lines changed

1 file changed

+36
-13
lines changed

system/modules/HTMLHelper/models/HTMLHelper.cfc

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -944,32 +944,55 @@ component extends="coldbox.system.FrameworkSupertype" accessors=true singleton{
944944
// ID Normalization
945945
normalizeID( arguments );
946946
// group wrapper?
947-
wrapTag(buffer,arguments.groupWrapper,0,arguments.groupWrapperAttrs);
947+
wrapTag( buffer, arguments.groupWrapper, 0, arguments.groupWrapperAttrs );
948+
948949
// label?
949-
if( len(arguments.label) ){ buffer.append( this.label(field=arguments.id,content=arguments.label,wrapper=arguments.labelWrapper,wrapperAttrs=arguments.labelWrapperAttrs,class=arguments.labelClass,
950-
labelMode = (arguments.inputInsideLabel ? 1 : 0), labelAttrs=arguments.labelAttrs) ); }
950+
if( len( arguments.label ) ){
951+
buffer.append(
952+
this.label(
953+
field = arguments.id,
954+
content = arguments.label,
955+
wrapper = arguments.labelWrapper,
956+
wrapperAttrs = arguments.labelWrapperAttrs,
957+
class = arguments.labelClass,
958+
labelMode = ( arguments.inputInsideLabel ? 1 : 0 ),
959+
labelAttrs = arguments.labelAttrs
960+
)
961+
);
962+
}
951963

952964
//wrapper?
953-
wrapTag(buffer,arguments.wrapper,0,arguments.wrapperAttrs);
965+
wrapTag( buffer, arguments.wrapper, 0, arguments.wrapperAttrs );
954966

955967
// disabled fix
956-
if( arguments.disabled ){ arguments.disabled = "disabled"; }
957-
else{ arguments.disabled = ""; }
968+
if( arguments.disabled ){
969+
arguments.disabled = "disabled";
970+
} else {
971+
arguments.disabled = "";
972+
}
958973
// readonly fix
959-
if( arguments.readonly ){ arguments.readonly = "readonly"; }
960-
else{ arguments.readonly = ""; }
974+
if( arguments.readonly ){
975+
arguments.readonly = "readonly";
976+
} else {
977+
arguments.readonly = "";
978+
}
961979

962980
// Entity Binding?
963-
bindValue(arguments);
981+
bindValue( arguments );
964982

965983
// create textarea
966-
buffer.append("<textarea");
967-
flattenAttributes(arguments,"value,label,wrapper,labelWrapper,groupWrapper,labelAttrs,labelClass,bind,bindProperty,inputInsideLabel",buffer).append(">#encodeForHTML( arguments.value )#</textarea>");
984+
buffer.append( "<textarea" );
985+
flattenAttributes(
986+
arguments,
987+
"value,label,wrapper,labelWrapper,groupWrapper,labelAttrs,labelClass,bind,bindProperty,inputInsideLabel",
988+
buffer
989+
).append(">#variables.settings.encodeValues ? encodeForHTML( arguments.value ) : arguments.value#</textarea>");
968990

969991
//wrapper?
970-
wrapTag(buffer,arguments.wrapper,1);
992+
wrapTag( buffer, arguments.wrapper, 1 );
971993
// group wrapper?
972-
wrapTag(buffer,arguments.groupWrapper,1);
994+
wrapTag( buffer, arguments.groupWrapper, 1 );
995+
973996
return buffer.toString();
974997
}
975998

0 commit comments

Comments
 (0)