We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9f0323d + cd4ff40 commit e112968Copy full SHA for e112968
scripts/check_svg_meta.sh
@@ -113,11 +113,26 @@ check_width_height() {
113
fi
114
}
115
116
+check_javascript() {
117
+ local file="$1"
118
+ local match
119
+ # matches both "text/javascript" and <script> tags
120
+ while read -r match
121
+ do
122
+ error "found script: ${match::64}"
123
+ done < <(grep -Hn script "$file")
124
125
126
+ error "found function: ${match::64}"
127
+ done < <(grep -Hn function "$file")
128
+}
129
+
130
while IFS= read -r file
131
do
132
check_absolute_path "$file"
133
check_meta_filename_match "$file"
134
check_width_height "$file"
135
+ check_javascript "$file"
136
done < <(find . -type f -name "*.svg")
137
138
if [ "$num_errors" -ne "0" ]
0 commit comments