Some string cleanups.

Also, I think I fixed an accidental memory leak I introduced.
This commit is contained in:
2025-08-11 03:02:26 -04:00
parent 2394e7d9f7
commit 9c4d7b6849
3 changed files with 19 additions and 29 deletions

View File

@ -674,7 +674,6 @@ void Html_tag_content_textarea(DilloHtml *html, const char *tag, int tagsize)
*/
void Html_tag_close_textarea(DilloHtml *html)
{
char *str;
int i;
if (html->InFlags & IN_TEXTAREA && !S_TOP(html)->display_none) {
@ -696,11 +695,11 @@ void Html_tag_close_textarea(DilloHtml *html)
}
/* The HTML3.2 spec says it can have "text and character entities". */
str = a_Html_parse_entities(html, html->Stash->str, html->Stash->len);
auto str = a_Html_parse_entities(html, html->Stash->str, html->Stash->len);
auto input = Html_get_current_input(*html);
if (input) {
input->init_str = str;
((MultiLineTextResource *)input->embed->getResource ())->setText(str);
((MultiLineTextResource *)input->embed->getResource ())->setText(str.c_str());
}
}