Method: Jekyll::Collection#sanitize_label
- Defined in:
- lib/jekyll/collection.rb
#sanitize_label(label) ⇒ Object
Produce a sanitized label name Label names may not contain anything but alphanumeric characters,
underscores, and hyphens.
label - the possibly-unsafe label
Returns a sanitized version of the label.
169 170 171 |
# File 'lib/jekyll/collection.rb', line 169 def sanitize_label(label) label.gsub(%r![^a-z0-9_\-.]!i, "") end |