[gxml/gxml-0.20] XParser: MatchInfo.fetch_named() returns an empty string for no result
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml/gxml-0.20] XParser: MatchInfo.fetch_named() returns an empty string for no result
- Date: Mon, 23 Aug 2021 03:06:43 +0000 (UTC)
commit 2ddddef8231faaceb8d3538e65b11a0aaab2523e
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Jul 17 13:16:59 2021 +0200
XParser: MatchInfo.fetch_named() returns an empty string for no result
gxml/XParser.vala | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/gxml/XParser.vala b/gxml/XParser.vala
index 67ab0fa2..ba5c0d1b 100644
--- a/gxml/XParser.vala
+++ b/gxml/XParser.vala
@@ -428,8 +428,10 @@ public class GXml.XParser : GLib.Object, GXml.Parser {
return false;
}
string pid = info.fetch_named ("pid");
+ if (pid == "") pid = null;
if (pid != null) pid = pid.replace ("\"","").chomp ().strip ();
string sid = info.fetch_named ("sid");
+ if (sid == "") sid = null;
if (sid != null) sid = sid.replace ("\"","").chomp ().strip ();
n = new GXml.DocumentType (_document, tr.const_local_name (), pid, sid);
parent.append_child (n);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]