Mercurial > urweb
comparison src/c/urweb.c @ 2008:93ff76058825
HTML5 data-* attributes
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 02 May 2014 15:32:10 -0400 |
parents | 16f5f136a807 |
children | 77cc9169d6e0 |
comparison
equal
deleted
inserted
replaced
2007:d3a0f2b8af28 | 2008:93ff76058825 |
---|---|
4394 uw_error(ctx, FATAL, "firstFormField: Missing null terminator"); | 4394 uw_error(ctx, FATAL, "firstFormField: Missing null terminator"); |
4395 f->remaining = s+1; | 4395 f->remaining = s+1; |
4396 | 4396 |
4397 return f; | 4397 return f; |
4398 } | 4398 } |
4399 | |
4400 uw_Basis_string uw_Basis_blessData(uw_context ctx, uw_Basis_string s) { | |
4401 char *p = s; | |
4402 | |
4403 for (; *p; ++p) | |
4404 if (!isalnum(*p) && *p != '-' && *p != '_') | |
4405 uw_error(ctx, FATAL, "Illegal HTML5 data-* attribute: %s", s); | |
4406 | |
4407 return s; | |
4408 } |