2026年6月9日 星期二

[研究]Mend(WhiteSource)把不該做HttpUtility.HtmlEncode的
處理掉了

[研究]Mend(WhiteSource)把不該做HttpUtility.HtmlEncode的<br />處理掉了

2025-06-08

環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C# + SQL Server 2019 + SQL Server Management Studio (SSMS) 20.2

********************************************************************************
.cs 內容


//lblError.Text = lblError.Text + "匯入 " + affectRow.ToString() + " 筆<br />"; //lblError.Text = HttpUtility.HtmlEncode(lblError.Text + "匯入 " + affectRow.ToString() + " 筆<br />"); //Mend亂建議,上面應該改成下面 lblError.Text = HttpUtility.HtmlEncode(lblError.Text + "匯入 " + affectRow.ToString() + " 筆") + "<br />";

(完)

沒有留言:

張貼留言