From 1906bdc2bc5bbbabc3d511b2ce9e51b9e12dadd3 Mon Sep 17 00:00:00 2001 From: yaminipriya16 Date: Wed, 18 Apr 2018 20:15:00 +0530 Subject: [PATCH] URLs should follow a strict structure --- config/rules.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/rules.yml b/config/rules.yml index 3af5071..e536258 100644 --- a/config/rules.yml +++ b/config/rules.yml @@ -118,6 +118,12 @@ seo: errors: regex: !!js/regexp /^https/ + # URL should not contain special characters and underscores + # Alternatively, it should only contain lowercase letters, underscores and numbers + - type: url + errors: + regex: !!js/regexp /^https?:\/\/[a-z0-9.\-_]+\/[a-z0-9\-\/]*$/ + og: rules: - type: dom