c3d2-web/scripts/validate_xhtml5.sh

13 lines
425 B
Bash
Executable File

#!/bin/sh
text=$(curl -s -d @$1 -H "Content-Type: application/xhtml+xml; charset=UTF-8" 'http://validator.nu/?out=text&preset=http://s.validator.nu/xhtml5-aria-rdf-svg-mathml.rnc+http://s.validator.nu/html5/assertions.sch+http://c.validator.nu/all/')
if [ -n "$(echo "$text"|grep "The document validates according to the specified schema(s).")" ]; then
exit 0
else
echo "=== $1 ==="
echo "$text"
exit 1
fi