Page MenuHomePhabricator

Avoid unnecessary encoding of '<', '>' and '&' in output of load.php
Open, MediumPublic

Description

The styles and messages delivered by load.php contains unnecessary escaped characters like \u003E instead of >. Escaping of <, > and & is not needed here and is a waste of traffic.

Examples:

Event Timeline

Fomafix created this task.Jul 30 2019, 8:43 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 30 2019, 8:43 AM

Change 526385 had a related patch set uploaded (by Fomafix; owner: Fomafix):
[mediawiki/core@master] ResourceLoader: Avoid escaping of characters in styles

https://gerrit.wikimedia.org/r/526385

Krinkle triaged this task as Medium priority.Jul 30 2019, 1:11 PM
Krinkle moved this task from Inbox to Accepted Enhancement on the MediaWiki-ResourceLoader board.
Krinkle moved this task from Inbox to Backlog: Small & Maintenance on the Performance-Team board.
Krinkle added a subscriber: Krinkle.

Thanks!

Fomafix renamed this task from Remove unnecessary escaping in styles to Remove unnecessary escaping of '<', '> and '&' in styles and messages.Aug 1 2019, 6:28 PM
Fomafix renamed this task from Remove unnecessary escaping of '<', '> and '&' in styles and messages to Remove unnecessary escaping of '<', '>' and '&' in styles and messages.
Fomafix updated the task description. (Show Details)

Change 535266 had a related patch set uploaded (by Fomafix; owner: Fomafix):
[mediawiki/core@master] [WIP] resourceloader: Move encodeJsonForScript to ResourceLoaderContext

https://gerrit.wikimedia.org/r/535266

Fomafix renamed this task from Remove unnecessary escaping of '<', '>' and '&' in styles and messages to Avoid unnecessary encoding of '<', '>' and '&' in output of load.php.Sep 12 2019, 11:18 AM

Change 535266 merged by jenkins-bot:
[mediawiki/core@master] resourceloader: Add $context to static functions in ResourceLoader

https://gerrit.wikimedia.org/r/535266