diff mbox series

[ovs-dev,v2,2/2] table: fix html buffer output

Message ID 20180808003452.21396-2-aconole@redhat.com
State Accepted
Headers show
Series [ovs-dev,v2,1/2] table: append newline when printing tables | expand

Commit Message

Aaron Conole Aug. 8, 2018, 12:34 a.m. UTC
Prior to this commit, html output exhibiits a doppler effect for
content by continually printing strings passed from
table_print_html_cell.

Fixes: cb139fa8b3a1 ("table: New function table_format() for formatting a table as a string.")
Cc: Ben Pfaff <blp@ovn.org>
Cc: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Aaron Conole <aconole@redhat.com>
---
 lib/table.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Aaron Conole Aug. 8, 2018, 1:59 p.m. UTC | #1
Aaron Conole <aconole@redhat.com> writes:

> Prior to this commit, html output exhibiits a doppler effect for

Ironically, I duplicated an 'i' in the word exhibits here.  Let me know
if you want a respin or if it can be fixed while applying. :-x

> content by continually printing strings passed from
> table_print_html_cell.
>
> Fixes: cb139fa8b3a1 ("table: New function table_format() for formatting a table as a string.")
> Cc: Ben Pfaff <blp@ovn.org>
> Cc: Jakub Sitnicki <jsitnicki@gmail.com>
> Signed-off-by: Aaron Conole <aconole@redhat.com>
> ---
Ben Pfaff Aug. 8, 2018, 6:19 p.m. UTC | #2
On Wed, Aug 08, 2018 at 09:59:40AM -0400, Aaron Conole wrote:
> Aaron Conole <aconole@redhat.com> writes:
> 
> > Prior to this commit, html output exhibiits a doppler effect for
> 
> Ironically, I duplicated an 'i' in the word exhibits here.  Let me know
> if you want a respin or if it can be fixed while applying. :-x

I fixed that up and applied this to master and branch-2.10.  Thank you!
diff mbox series

Patch

diff --git a/lib/table.c b/lib/table.c
index 19bf89262..ab72668c7 100644
--- a/lib/table.c
+++ b/lib/table.c
@@ -349,7 +349,7 @@  static void
 table_escape_html_text__(const char *content, size_t n, struct ds *s)
 {
     if (!strpbrk(content, "&<>\"")) {
-        ds_put_cstr(s, content);
+        ds_put_buffer(s, content, n);
     } else {
         size_t i;