Opened 8 years ago

Last modified 8 years ago

#13485 new defect

purple_markup_html_to_xhtml fails to handle comments

Reported by: loic Owned by:
Milestone: Component: libpurple
Version: 2.7.10 Keywords:
Cc: darkrain42

Description (last modified by loic)

in libpurple/util.c

				if(!g_ascii_strncasecmp(c, "<!--", strlen("<!--"))) {
					char *p = strstr(c + strlen("<!--"), "-->");
					if(p) {
						if(xhtml)
							xhtml = g_string_append(xhtml, "<!--");
						c += strlen("<!--");
						continue;
					}
				}

is wrong and leads to the following

	purple_markup_html_to_xhtml("<!--COMMENT-->", &xhtml, &plaintext);
	assert_string_equal_free("<!--COMMENT-->", xhtml);
	assert_string_equal_free("COMMENT-->", plaintext);

which can be added to START_TEST(test_markup_html_to_xhtml) in the libpurple/tests/test_util.c file.

Change History (2)

comment:1 Changed 8 years ago by loic

  • Summary changed from purple_markup_html_to_xhtml to purple_markup_html_to_xhtml fails to handle comments

comment:2 Changed 8 years ago by loic

  • Description modified (diff)
Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!