htmlpurifier icon indicating copy to clipboard operation
htmlpurifier copied to clipboard

UNC path with Backslash character don't work

Open lenhatthanh20 opened this issue 2 years ago • 0 comments

Hello,

Background

I am using HTML Purifier to handle URI validation. But I get a problem when using it file file protocol. It won't work with my case: file:\\\Users\thanh-le\Downloads\my-folder

Cause

The backslash character (\) will be encode by HTMLPurifier_PercentEncoder

Suggest Solution

Ignore backslash when doing percent encode by adding backslash character here: https://github.com/ezyang/htmlpurifier/blob/d9fbef8e27f6a0848a8987a8534351de98eb0fa1/library/HTMLPurifier/URI.php

How to you think about this issue? Thank you so much.

lenhatthanh20 avatar Apr 19 '24 03:04 lenhatthanh20