(uri: string)
| 1802 | * that can handle un-encoded URIs, where `%` is the only ambiguous character. |
| 1803 | */ |
| 1804 | export function partialEncodeURIPath(uri: string): string { |
| 1805 | if (uri.startsWith('data:')) return uri |
| 1806 | const filePath = cleanUrl(uri) |
| 1807 | const postfix = filePath !== uri ? uri.slice(filePath.length) : '' |
| 1808 | return filePath.replaceAll('%', '%25') + postfix |
| 1809 | } |
| 1810 | |
| 1811 | export function decodeURIIfPossible(input: string): string | undefined { |
| 1812 | try { |
no test coverage detected