JILS-13: Certain HTML chars are being double encoded



Issue Information

Issue Type: Bug
 
Priority: Major
Status: Closed

Reported By:
Ben Tasker
Assigned To:
Ben Tasker
Project: Jira Issue Listing Script (JILS)
Resolution: Fixed (2016-04-29 14:59:38)
Affects Version: 0.01b,
Target version: 0.01b,

Created: 2014-11-03 12:58:43
Time Spent Working


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 &quot

Occasionally it seems to happen twice, so we see &quot

Affects lt ,_gt_,_amp_,_quot_ and probably others too


Toggle State Changes

Activity


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.
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).
btasker changed status from 'Open' to 'Resolved'
btasker added 'Fixed' to resolution
btasker changed status from 'Resolved' to 'Closed'

Repo: Jira-Issue-Listing
Commit: bc05716b51fa3d5dc6a71d09fa630266dfffa9bc
Author: Ben Tasker <github@<Domain Hidden>>

Date: Wed Nov 05 23:56:35 2014 +0000
Commit Message: Removed double html encoding. See JILS-13



Modified (-)(+)
-------
issue_page.php




Webhook User-Agent

GitHub-Hookshot/05404f8


View Commit


Repo: Jira-Issue-Listing
Commit: c69f68559f7f659db3e126979f9ffd2fe6720614
Author: Ben Tasker <github@<Domain Hidden>>

Date: Thu Nov 06 15:42:54 2014 +0000
Commit Message: Dropped in additional htmlentities calls. See JILS-13



Modified (-)(+)
-------
issue_page.php




Webhook User-Agent

GitHub-Hookshot/82e7c0c


View Commit


Repo: Jira-Issue-Listing
Commit: a22d25102cc88e43cb9a486dade59579805a5ad6
Author: Ben Tasker <github@<Domain Hidden>>

Date: Thu Nov 06 15:45:53 2014 +0000
Commit Message: Added handling for MS encoding. See JILS-13



Modified (-)(+)
-------
utils.class.php




Webhook User-Agent

GitHub-Hookshot/82e7c0c


View Commit

Re-opening to assign to a version
btasker removed 'Fixed' from resolution
btasker changed status from 'Closed' to 'Reopened'
Assigning to v0.01b
btasker added '0.01b' to Version
btasker added '0.01b' to Fix Version
Re-Closing
btasker changed status from 'Reopened' to 'Resolved'
btasker added 'Fixed' to resolution
btasker changed status from 'Resolved' to 'Closed'