Skip to content

Conversation

@anonymoususer72041
Copy link
Contributor

Summary

This PR prevents text fields from being stored as HTML entities by switching internal/admin write paths from getSanitisedInput() to trimmed raw input. It also normalizes escaping in a few templates where affected fields were echoed without the standard escaping helper.

To keep existing installations consistent, this PR adds an installer schema upgrade that detects entity-encoded values in common text columns (job orders, companies, contacts, candidates, activities, calendar events) and decodes them back to raw UTF-8.

Note: The public Careers Portal (modules/careers/CareersUI.php) is intentionally left functionally unchanged in this PR. Related input/output hardening is being handled in PR #697. Once #697 lands, we can reassess whether additional adjustments are needed here without overlapping changes.

Motivation

While working on the special-character issues addressed in #701, it became apparent that some code paths still transform user input before it reaches the database, resulting in HTML entities being persisted. This can lead to double-escaping and inconsistent rendering of special characters across modules and environments.

By standardizing on "store raw, escape on output" and providing a best-effort upgrade step to normalize legacy data, this PR reduces character corruption risks without tackling formatting concerns like line break rendering yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant