########################################################################################## JILS-13: Certain HTML chars are being double encoded ########################################################################################## Issue Type: Bug ----------------------------------------------------------------------------------------- Issue Information ==================== Priority: Major Status: Closed Resolution: Fixed (2016-04-29 14:59:38) Project: Jira Issue Listing Script (JILS) Reported By: btasker Assigned To: btasker Affected Versions: - 0.01b Targeted for fix in version: - 0.01b Time Estimate: 0 minutes Time Logged: 0 minutes ----------------------------------------------------------------------------------------- Issue Description ================== Thought I'd fixed this previously, but can't see the commit. Certain characters end up double html encoded, so rather than seeing quotes we see " Occasionally it seems to happen twice, so we see " Affects _lt_,_gt_,_amp_,_quot_ and probably others too ----------------------------------------------------------------------------------------- Activity ========== ----------------------------------------------------------------------------------------- 2014-11-05 23:26:58 btasker ----------------------------------------------------------------------------------------- JIRA doesn't encode HTML entities before storing into the database (i.e. it stores a literal < rather than <) so something in the processing flow of the script is causing the entities to get encoded twice. Need to identify and remove it. ----------------------------------------------------------------------------------------- 2014-11-05 23:58:23 btasker ----------------------------------------------------------------------------------------- Root of the problem was that both _htmlentities_ and _htmlspecialchars_ were being used. The HTMLEntities calls were introduced a while back to resolve issues with the display of Pound (£) signs. Have stripped out the double calls and made sure only one or the other is used (which one depends on which is most appropriate for the relevant field). Have also dropped some processing in to deal with those crappy MS specific characters (special quotes etc). ----------------------------------------------------------------------------------------- 2014-11-05 23:58:40 ----------------------------------------------------------------------------------------- btasker changed status from 'Open' to 'Resolved' ----------------------------------------------------------------------------------------- 2014-11-05 23:58:40 ----------------------------------------------------------------------------------------- btasker added 'Fixed' to resolution ----------------------------------------------------------------------------------------- 2014-11-05 23:58:44 ----------------------------------------------------------------------------------------- btasker changed status from 'Resolved' to 'Closed' ----------------------------------------------------------------------------------------- 2014-11-06 00:00:35 git ----------------------------------------------------------------------------------------- -- BEGIN QUOTE -- Repo: Jira-Issue-Listing Commit: bc05716b51fa3d5dc6a71d09fa630266dfffa9bc Author: Ben Tasker