mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
Use closing_tag variable in tests.
This commit is contained in:
parent
37ec65247d
commit
d9f0de82f8
@ -396,23 +396,27 @@ abort:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!namelen) goto see;
|
if (!namelen) goto see;
|
||||||
|
|
||||||
if (name[0] == '/') {
|
if (name[0] == '/') {
|
||||||
|
namelen--;
|
||||||
|
if (!namelen) goto see;
|
||||||
|
name++;
|
||||||
closing_tag = 1;
|
closing_tag = 1;
|
||||||
} else {
|
} else {
|
||||||
closing_tag = 0;
|
closing_tag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strlcasecmp(name, namelen, "/SELECT", 7)) {
|
if (closing_tag && !strlcasecmp(name, namelen, "SELECT", 6)) {
|
||||||
add_select_item(&lnk_menu, &lbl, &orig_lbl, values, order, nnmi);
|
add_select_item(&lnk_menu, &lbl, &orig_lbl, values, order, nnmi);
|
||||||
goto end_parse;
|
goto end_parse;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strlcasecmp(name, namelen, "/OPTION", 7)) {
|
if (closing_tag && !strlcasecmp(name, namelen, "OPTION", 6)) {
|
||||||
add_select_item(&lnk_menu, &lbl, &orig_lbl, values, order, nnmi);
|
add_select_item(&lnk_menu, &lbl, &orig_lbl, values, order, nnmi);
|
||||||
goto see;
|
goto see;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strlcasecmp(name, namelen, "OPTION", 6)) {
|
if (!closing_tag && !strlcasecmp(name, namelen, "OPTION", 6)) {
|
||||||
unsigned char *value, *label;
|
unsigned char *value, *label;
|
||||||
|
|
||||||
add_select_item(&lnk_menu, &lbl, &orig_lbl, values, order, nnmi);
|
add_select_item(&lnk_menu, &lbl, &orig_lbl, values, order, nnmi);
|
||||||
@ -438,14 +442,14 @@ abort:
|
|||||||
goto see;
|
goto see;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strlcasecmp(name, namelen, "OPTGROUP", 8)
|
if ((!closing_tag && !strlcasecmp(name, namelen, "OPTGROUP", 8))
|
||||||
|| !strlcasecmp(name, namelen, "/OPTGROUP", 9)) {
|
|| (closing_tag && !strlcasecmp(name, namelen, "/OPTGROUP", 9))) {
|
||||||
add_select_item(&lnk_menu, &lbl, &orig_lbl, values, order, nnmi);
|
add_select_item(&lnk_menu, &lbl, &orig_lbl, values, order, nnmi);
|
||||||
|
|
||||||
if (group) new_menu_item(&lnk_menu, NULL, -1, 0), group = 0;
|
if (group) new_menu_item(&lnk_menu, NULL, -1, 0), group = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strlcasecmp(name, namelen, "OPTGROUP", 8)) {
|
if (!closing_tag && !strlcasecmp(name, namelen, "OPTGROUP", 8)) {
|
||||||
unsigned char *label;
|
unsigned char *label;
|
||||||
|
|
||||||
label = get_attr_val(t_attr, "label", html_context->options);
|
label = get_attr_val(t_attr, "label", html_context->options);
|
||||||
|
Loading…
Reference in New Issue
Block a user