mathiasbynens / mathiasbynens/CSS.escape

CSS.unescape ?

Open
#18 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
499
Forks
25
PR merge metrics
No merged PRs in 30d

Description

👋 folks! I know it might be the wrong place to ask, but someone else might be searching this repo too in the future. What would be the reverse operation? I’m looking for something like this:

```js
const original = 12345;

const unescape = () => { /* ?? */ };

expect(unescape(CSS.escape(original))).toEqual(original)
```

Relevant question on StackOverflow: https://stackoverflow.com/q/64273537/1818285

Package with exact name match: https://www.npmjs.com/package/css.unescape (suspiciously no weekly downloads).

My use case: take something like:
- `url(some-escaped-url)`
- `url('some-escaped-url')`
- `url("some-escaped-url")`

and reliably extract URL value from such input.

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

The issue centers on the CSS.escape entry point in this JavaScript polyfill; begin by comparing its behavior with the CSSOM definition and the linked Stack Overflow question. Define what “done” means for reversing escaped values, including the three url(...) forms, before deciding whether a repository change is in scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.