aboutsummaryrefslogtreecommitdiff
path: root/src/html.cc
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2009-03-26 11:21:20 -0400
committerJorge Arellano Cid <jcid@dillo.org>2009-03-26 11:21:20 -0400
commit73966626709d7bc83d0d7e5b173481139ee3e0af (patch)
tree30c6f8c94180402e4d1667d94130224c7131d2e7 /src/html.cc
parent899416bf307bcd80654217f6f35d73e4fe82ca3e (diff)
Added support for a quoted URL in META refresh
Diffstat (limited to 'src/html.cc')
-rw-r--r--src/html.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/html.cc b/src/html.cc
index e06c5653..912c9a6a 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -2786,7 +2786,7 @@ static void Html_tag_open_meta(DilloHtml *html, const char *tag, int tagsize)
" <a href='%s'>here</a>%s</td></tr></table><br>\n";
const char *equiv, *content, *new_content;
- char delay_str[64];
+ char delay_str[64], *mr_url, *p;
Dstr *ds_msg;
int delay;
@@ -2809,12 +2809,21 @@ static void Html_tag_open_meta(DilloHtml *html, const char *tag, int tagsize)
}
/* Skip to anything after "URL=" */
while (*content && *(content++) != '=') ;
+ /* Handle the case of a quoted URL */
+ if (*content == '"' || *content == '\'') {
+ if (p = strchr(content + 1, *content))
+ mr_url = dStrndup(content + 1, p - content - 1);
+ else
+ mr_url = strdup(content + 1);
+ } else {
+ mr_url = strdup(content);
+ }
/* Send a custom HTML message.
* TODO: This is a hairy hack,
* It'd be much better to build a widget. */
ds_msg = dStr_sized_new(256);
- dStr_sprintf(ds_msg, meta_template, content, delay_str);
+ dStr_sprintf(ds_msg, meta_template, mr_url, delay_str);
{
int o_InFlags = html->InFlags;
int o_TagSoup = html->TagSoup;