Adding \n supports

This commit is contained in:
AnonymusRaccoon
2020-02-27 16:27:36 +01:00
parent 91f72ab506
commit 37d99e927e
+5 -2
View File
@@ -9,6 +9,7 @@
#include "xml_internal.h" #include "xml_internal.h"
#include "my.h" #include "my.h"
#include "math.h" #include "math.h"
#include "my.h"
#include <stddef.h> #include <stddef.h>
char *xml_gettempprop(node *n, const char *key) char *xml_gettempprop(node *n, const char *key)
@@ -26,8 +27,10 @@ char *xml_getproperty(node *n, const char *key)
{ {
char *prop = xml_gettempprop(n, key); char *prop = xml_gettempprop(n, key);
if (prop) if (prop) {
return (my_strdup(prop)); my_str_replace(prop, "\\n", '\n');
return (my_strdup(prop));
}
return (NULL); return (NULL);
} }