ezyang / ezyang/htmlpurifier

URI schemas with dashes

Open
#378 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
3.4k
Forks
361
Avg merge
3d 41m
Merged PRs (30d)
2

Description

Having a bit of issues with htmlpurifier when it comes to links with the schemapart containing a dash, eg: "foo-bar://something/something-the-local-computer-handles-when-clicked"

This would be fairly straightforward with the URI.AllowedSchemes and writing a class for it, but a class with a dash in it's name isn't allowed in PHP. eg. in this case "HTMLPurifier_URIScheme_foo-bar".

As far as I'm aware, "+", "-"... etc are allowed by the rfc2396.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading URI.AllowedSchemes and the HTMLPurifier_URIScheme naming approach described in the issue, then check how URI schemes containing dashes are currently handled. Done means links using a dashed scheme such as foo-bar:// are accepted safely while existing scheme validation continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.