Skip to content
Snippets Groups Projects
Commit dcba1970 authored by Marte Fossum's avatar Marte Fossum
Browse files

Merge branch 'fix-allowed-names' into 'master'

Fix allowed names

See merge request !420
parents 8bf9b5e6 51659b2d
No related branches found
No related tags found
2 merge requests!420Fix allowed names,!419Add --pull=always and remove --no-cache from image build options
Pipeline #228741 passed
......@@ -125,6 +125,7 @@ function stringContainsIllegalChars(string: string): boolean {
// Only allow the following characters:
// ----- Basic Latin -----
// U+0020 (Space)
// U+002D (Hyphen-minus)
// U+0041 - U+005A (Latin Alphabet: Uppercase)
// U+0061 - U+007A (Latin Alphabet: Lowercase)
// ----- Latin-1 Supplement -----
......@@ -136,7 +137,7 @@ function stringContainsIllegalChars(string: string): boolean {
// U+0100 - U+017F (European Latin)
// eslint-disable-next-line no-control-regex
return /[^\u0020\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u017F]/g.test(
return /[^\u0020\u002D\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u017F]/g.test(
string
)
}
......
......@@ -25,7 +25,7 @@ fi
echo "Will build using $BUILDER"
echo "Building $IMAGE_TAG"
$BUILDER build --format docker --no-cache -t $IMAGE_TAG .
$BUILDER build --format docker --pull=always -t $IMAGE_TAG .
echo "Pushing $IMAGE_TAG"
$BUILDER push $IMAGE_TAG
......
......@@ -33,6 +33,7 @@ def test_not_valid_so_number():
"string, expected_output",
[
("AZ az ÀÖ ØÞßö øÿ Āſ", False),
("Kari-Mette", False),
("aaƂåå", True),
("!", True),
("÷", True),
......
......@@ -226,6 +226,7 @@ def string_contains_illegal_chars(string: str) -> bool:
# Only allow the following characters:
# ----- Basic Latin -----
# U+0020 (Space)
# U+002D (Hyphen-minus)
# U+0041 - U+005A (Latin Alphabet: Uppercase)
# U+0061 - U+007A (Latin Alphabet: Lowercase)
# ----- Latin-1 Supplement -----
......@@ -237,7 +238,7 @@ def string_contains_illegal_chars(string: str) -> bool:
# U+0100 - U+017F (European Latin)
return bool(
re.search(
r"[^\u0020\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u017F]",
r"[^\u0020\u002D\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u017F]",
string,
)
)
......@@ -28,7 +28,7 @@ fi
echo "Will build using $BUILDER"
echo "Building $IMAGE_TAG"
$BUILDER build --format docker --no-cache -t $IMAGE_TAG .
$BUILDER build --format docker --pull=always -t $IMAGE_TAG .
echo "Pushing $IMAGE_TAG"
$BUILDER push $IMAGE_TAG
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment