Repository navigation
Fix result field double encoding and preserve safe line breaks - #29
Merged
Merged
Conversation
The admin candidate list still showed field A line breaks as literal tags, unlike the voting, result and ballot screens. Apply the same purified output there; fields B-F stay plain text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
自訂欄 A 儲存
測試<br>測試時,結果表格先經 Model::i18n() 編碼,再經 GridView 編碼,讓換行標籤與 R&D 顯示為 entity。此修改保留一層適當輸出處理,讓合法換行實際呈現,同時移除不安全的 HTML。修改範圍:
<br>維持文字語意。驗證:
result-fields:23/23 通過,包含實際換行位置、12 項 CSV/Excel/HTML 匯出內容及紙本選票;不包含 LibreOffice 開檔驗證。設定與候選資料於 finally 還原。保留草稿供審閱,未合併、未部署正式環境。
2026-11-06 補充(審閱回饋):
views/candi/data.php)的自訂欄 A 原本以純文字顯示<br>,與其他畫面不一致;改用同一 HtmlPurifier 政策輸出,欄 B–F 維持純文字。testCandidateManagementRendersFieldAOnce(換行、粗體、事件屬性移除、欄 B 純文字),在修改前的 view 上失敗。ResultFieldRenderingCest15 tests/680 assertions 通過。