[BACK]Return to html.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/html.c between version 1.229 and 1.230

version 1.229, 2018/05/25 20:23:51 version 1.230, 2018/05/28 14:13:36
Line 287  html_make_id(const struct roff_node *n, int unique)
Line 287  html_make_id(const struct roff_node *n, int unique)
         if (buf == NULL)          if (buf == NULL)
                 return NULL;                  return NULL;
   
         /* http://www.w3.org/TR/html5/dom.html#the-id-attribute */          /*
            * In ID attributes, only use ASCII characters that are
            * permitted in URL-fragment strings according to the
            * explicit list at:
            * https://url.spec.whatwg.org/#url-fragment-string
            */
   
         for (cp = buf; *cp != '\0'; cp++)          for (cp = buf; *cp != '\0'; cp++)
                 if (*cp == ' ')                  if (isalnum((unsigned char)*cp) == 0 &&
                       strchr("!$&'()*+,-./:;=?@_~", *cp) == NULL)
                         *cp = '_';                          *cp = '_';
   
         if (unique == 0)          if (unique == 0)

Legend:
Removed from v.1.229  
changed lines
  Added in v.1.230

CVSweb