mirror of
https://github.com/gnosygnu/xowa.git
synced 2024-10-27 20:34:16 +00:00
Parser.TemplateStyles: Check if title is null [#416]
This commit is contained in:
parent
581aa5123c
commit
2fc03f6211
@ -34,7 +34,7 @@ public class Template_styles_nde implements Xox_xnde, Mwh_atr_itm_owner2 {
|
||||
ctx.Para().Process_block__xnde(xnde.Tag(), Xop_xnde_tag.Block_bgn);
|
||||
Xox_xnde_.Parse_xatrs(wiki, this, xatrs_hash, src, xnde);
|
||||
// get css_ttl
|
||||
css_ttl = wiki.Ttl_parse(css_ttl_bry);
|
||||
css_ttl = css_ttl_bry == null ? null : wiki.Ttl_parse(css_ttl_bry); // must check for null ttl; EX:"<templatestyle src{{=}}A.css>"; PAGE:en.w:Switzerland; ISSUE#:416; DATE:2019-03-31
|
||||
if (css_ttl == null) {
|
||||
Gfo_usr_dlg_.Instance.Warn_many("", "", "Template_styles_nde.invalid_ttl: wiki=~{0} page=~{1} css_ttl=~{2}", wiki.Domain_bry(), ctx.Page().Url_bry_safe(), css_ttl_bry);
|
||||
return;
|
||||
|
@ -98,6 +98,13 @@ public class Template_styles_nde_tst {
|
||||
, ""
|
||||
);
|
||||
}
|
||||
@Test public void Error__missing_src() {
|
||||
fxt.Test__parse
|
||||
( "<templatestyles src{{=}}'Missing.css'/>"// PAGE:en.w:Switzerland; ISSUE#:416; DATE:2019-03-31
|
||||
, "<strong class=\"error\">Invalid title for TemplateStyles src attribute.</strong>"
|
||||
, ""
|
||||
);
|
||||
}
|
||||
}
|
||||
class Template_styles_nde_fxt {
|
||||
private final Xop_fxt parser_fxt = new Xop_fxt();
|
||||
|
Loading…
Reference in New Issue
Block a user