diff --git a/app/tutorial.rb b/app/tutorial.rb
index d3a217fa..7a6523a0 100644
--- a/app/tutorial.rb
+++ b/app/tutorial.rb
@@ -24,6 +24,7 @@ end
get '/tutorial/:section/?' do
require_login
+ not_found unless %w{html css js}.include?(params[:section])
redirect "/tutorial/#{params[:section]}/1"
end
diff --git a/views/tutorial/html/8.erb b/views/tutorial/html/8.erb
index d54cb341..cf61d389 100644
--- a/views/tutorial/html/8.erb
+++ b/views/tutorial/html/8.erb
@@ -38,8 +38,7 @@
notok('You need to add an href to your a tag, like: href="http://neocities.org"')
return
}
-
- if(a.text() == '' || a.text().match(/\s+/)) {
+ if(a.text() == '' || !a.text().match(/[^\s]+/)) {
notok('You need to add a name for your link, which is the text between the <a> tag, and the closing tag </a>')
return
}