Skip to content

Commit 5e4f7b3

Browse files
committed
fixing bcp47 validation by requireing iso3, need to check if it is right
1 parent 8e60f57 commit 5e4f7b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

org/w3c/css/selectors/pseudofunctions/PseudoFunctionLang.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import java.util.IllformedLocaleException;
1515
import java.util.Locale;
1616
import java.util.Locale.Builder;
17+
import java.util.MissingResourceException;
1718

1819
/**
1920
* PseudoFunctionLang<br />
@@ -65,8 +66,9 @@ public static final CssValue parseLang(ApplContext ac, CssExpression exp, String
6566
Builder builder = new Builder();
6667
builder.setLanguageTag(lang);
6768
Locale l = builder.build();
69+
lang = l.getISO3Language();
6870
return val;
69-
} catch (IllformedLocaleException ex) {
71+
} catch (MissingResourceException|IllformedLocaleException ex) {
7072
throw new InvalidParamException("value", lang, caller, ac);
7173
}
7274
}

0 commit comments

Comments
 (0)