Skip to content

Commit a7be655

Browse files
authored
COLDBOX-1317 #resolve
ACF 2025 has removed htmlEditFormat
1 parent bafd43e commit a7be655

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

system/exceptions/BugReport.cfm

+2-4
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ A reporting template about exceptions in your ColdBox Apps
5151
</cfif>
5252
<tr>
5353
<td align="right" class="info"><strong>Message:</strong></td>
54-
<!--- Using HTMLEditFormat() on purpose so my line breaks aren't encoded! --->
55-
<td>#HTMLEditFormat( oException.getmessage() ).listChangeDelims( '<br>', chr(13)&chr(10) )#</td>
54+
<td>#encodeForHTML( oException.getmessage() ).listChangeDelims( '<br>', chr(13)&chr(10) )#</td>
5655
</tr>
5756
<cfif oException.getExtendedInfo() neq "">
5857
<tr>
@@ -64,8 +63,7 @@ A reporting template about exceptions in your ColdBox Apps
6463
<cfif len( oException.getDetail() ) neq 0>
6564
<tr>
6665
<td align="right" class="info"><strong>Detail:</strong></td>
67-
<!--- Using HTMLEditFormat() on purpose so my line breaks aren't encoded! --->
68-
<td>#HTMLEditFormat( oException.getDetail() ).listChangeDelims( '<br>', chr(13)&chr(10) )#</td>
66+
<td>#encodeForHTML( oException.getDetail() ).listChangeDelims( '<br>', chr(13)&chr(10) )#</td>
6967
</tr>
7068
</cfif>
7169
<tr>

system/exceptions/Whoops.cfm

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"Error Code" : ( oException.getErrorCode() != 0 ) ? oException.getErrorCode() : "",
1616
"Type" : oException.gettype(),
1717
"Extended Info" : ( oException.getExtendedInfo() != "" ) ? oException.getExtendedInfo() : "",
18-
"Message" : htmlEditFormat( oException.getmessage() ).listChangeDelims( "<br>", chr( 13 ) & chr( 10 ) ),
19-
"Detail" : htmlEditFormat( oException.getDetail() ).listChangeDelims( "<br>", chr( 13 ) & chr( 10 ) ),
18+
"Message" : encodeForHTML( oException.getmessage() ).listChangeDelims( "<br>", chr( 13 ) & chr( 10 ) ),
19+
"Detail" : encodeForHTML( oException.getDetail() ).listChangeDelims( "<br>", chr( 13 ) & chr( 10 ) ),
2020
"Environment" : controller.getSetting( "environment" ),
2121
"Event" : ( event.getCurrentEvent() != "" ) ? event.getCurrentEvent() : "",
2222
"Route" : ( event.getCurrentRoute() != "" ) ? event.getCurrentRoute() & (
@@ -250,7 +250,7 @@
250250
<cfif structKeyExists( instance, "codePrintPlain" ) && local.inDebugMode>
251251
<cfset codesnippet = instance.codePrintPlain>
252252
<cfset codesnippet = reReplace( codesnippet, "\n\t", " ", "All" )>
253-
<cfset codesnippet = htmlEditFormat( codesnippet )>
253+
<cfset codesnippet = encodeForHTML( codesnippet )>
254254
<cfset codesnippet = reReplace(
255255
codesnippet,
256256
"([0-9]+:)",

system/web/context/ExceptionBean.cfc

+1-2
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,7 @@ component accessors="true" {
298298
function processStackTrace( required str ){
299299
// cfformat-ignore-start
300300

301-
// Not using encodeForHTML() as it is too destructive and ruins whitespace chars and other stuff
302-
arguments.str = HTMLEditFormat( arguments.str );
301+
arguments.str = encodeForHTML( arguments.str );
303302
// process functions e.g. $funcINDEX.runFunction(
304303
arguments.str = reReplaceNoCase( arguments.str, "\$([^(\(|\:)]+)(\:|\()", "<span class='method'>$\1</span>(", "ALL" );
305304
// process characters within parentheses e.g. (ServletAuthenticationCallHandler.java:57)

0 commit comments

Comments
 (0)