http://mathiasbynens.be/notes/html5-id-class

> The only requirements left — apart from being unique in the document — are
> that the value must contain at least one character (can’t be empty), and
> that it can’t contain any space characters.
>


On Wed, Apr 30, 2014 at 2:54 PM, Calen Pennington
<notifications@github.com>wrote:

> In common/lib/xmodule/xmodule/modulestore/locations.py:
>
> > +        pattern = """
> > +            (?P<org>[^/]+)/
> > +            (?P<course>[^/]+)/
> > +            (?P<run>[^/]+)/
> > +            (?P<category>[^/]+)/
> > +            (?P<name>[^@/]+)
> > +            (@(?P<revision>[^/]+))?
> > +        """
> > +
> > +        match = re.match(pattern, serialized, re.VERBOSE)
> > +        if not match:
> > +            raise InvalidKeyError(cls, serialized)
> > +
> > +        return cls(**match.groupdict())
> > +
> > +    def html_id(self):
>
> Is url quote safe enough for html ids? It's not very clear to me what
> characters play nicely in html ids, unfortunately.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/edx/edx-platform/pull/3536/files#r12159545>
> .
>