Preserve newlines in proofread comments#2128
Open
ZhangTao08 wants to merge 3 commits into
Open
Conversation
When building per-person archive entries, try an identifier-based lookup if no recent archive is found (providing backward compatibility for archives linked by identifier/name). Rename the mapped variable for clarity and ensure the closure captures the outer $report. Also avoid rendering an empty status tag by checking that archive.status is non-empty before outputting the status badge.
Use nl2br when rendering proofread comments so line breaks are preserved in both PHP and Twig outputs. Also apply htmlPrep() to sanitize content before converting newlines. Small UI tweak: change sm:leading-5 to sm:leading-6 for the filter select. Added a console.log for the textarea selector to aid debugging. Files modified: modules/Reports/reporting_proofread.php, modules/Reports/templates/ui/writingStudentOverview.twig.html.
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.
Use nl2br when rendering proofread comments so line breaks are preserved in both PHP and Twig outputs. Also apply htmlPrep() to sanitize content before converting newlines. Small UI tweak: change sm:leading-5 to sm:leading-6 for the filter select. Added a console.log for the textarea selector to aid debugging.