projects
/
uzbl-mobile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
396043a
)
strip trailing newline from @()@ expansions
author
Brendan Taylor
<whateley@gmail.com>
Thu, 9 Jul 2009 01:23:33 +0000
(19:23 -0600)
committer
Brendan Taylor
<whateley@gmail.com>
Thu, 9 Jul 2009 01:23:33 +0000
(19:23 -0600)
uzbl.c
patch
|
blob
|
history
diff --git
a/uzbl.c
b/uzbl.c
index
eae4015
..
2751cb6
100644
(file)
--- a/
uzbl.c
+++ b/
uzbl.c
@@
-322,9
+322,13
@@
expand(char *s, guint recurse, gboolean escape_markup) {
g_error_free (err);
}
else if (*cmd_stdout) {
+ int len = strlen(cmd_stdout);
+
+ if(cmd_stdout[len-1] == '\n')
+ cmd_stdout[--len] = 0; /* strip trailing newline */
+
if(escape_markup) {
- char *b = g_markup_escape_text(cmd_stdout,
- strlen(cmd_stdout));
+ char *b = g_markup_escape_text(cmd_stdout, len);
g_string_append(buf, b);
g_free(b);
} else {