diff options
author | cinap_lenrek <cinap_lenrek@centraldogma> | 2011-10-13 13:49:29 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@centraldogma> | 2011-10-13 13:49:29 +0200 |
commit | c92ddf3fb5efe2e37ac9e3b1a1129f82de1bf837 (patch) | |
tree | b5b063c654e7ed078495ab6cfde48657bcb472c6 /sys/src/cmd/mothra/rdhtml.c | |
parent | e4048c13805a3d4bd5377985232a778604b9e8b8 (diff) |
mothra: support fragment urls
Diffstat (limited to 'sys/src/cmd/mothra/rdhtml.c')
-rw-r--r-- | sys/src/cmd/mothra/rdhtml.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/src/cmd/mothra/rdhtml.c b/sys/src/cmd/mothra/rdhtml.c index 6a8343f34..96407ac04 100644 --- a/sys/src/cmd/mothra/rdhtml.c +++ b/sys/src/cmd/mothra/rdhtml.c @@ -628,6 +628,14 @@ void plrdhtml(char *name, int fd, Www *dst){ pl_pushstate(&g, g.tag); break; } + if(str=pl_getattr(g.attr, "id")){ + char swap[NNAME]; + + strncpy(swap, g.state->name, sizeof(swap)); + strncpy(g.state->name, str, sizeof(g.state->name)); + pl_htmloutput(&g, 0, "", 0); + strncpy(g.state->name, swap, sizeof(g.state->name)); + } switch(g.tag){ default: htmlerror(g.name, g.lineno, |