Skip to content

Commit 296281a

Browse files
committed
Fix relative URL rewriting bug (Issue michaelrsweet#507)
1 parent cbf3130 commit 296281a

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

CHANGES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
- Updated PostScript and PDF date/time information to use UTC (Issue #490)
77
- Fixed multiple conversions of UTF-8 HTML files from the GUI (Issue #496)
88
- Fixed a compile bug on Solaris (Issue #498)
9-
- Fixed a markdown parsing issue (Issue #503)
9+
- Fixed a markdown parsing bug (Issue #503)
10+
- Fixed a relative URL handling bug (Issue #507)
1011
- Fixed a crash bug with bad title images (Issue #510)
1112
- Fixed some minor CodeQL warnings.
1213

htmldoc/htmllib.cxx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3460,7 +3460,7 @@ fix_filename(char *filename, /* I - Original filename */
34603460
static charnewfilename[1024];/* New filename */
34613461

34623462

3463-
// printf("fix_filename(filename=\"%s\", base=\"%s\")\n", filename, base);
3463+
printf("fix_filename(filename=\"%s\", base=\"%s\")\n", filename, base);
34643464

34653465
if (filename == NULL)
34663466
return (NULL);
@@ -3529,10 +3529,6 @@ fix_filename(char *filename, /* I - Original filename */
35293529
}
35303530
else
35313531
{
3532-
// Relative path, strip the last component from the resource...
3533-
if ((slash = strrchr(resource, '/')) != NULL)
3534-
*slash = '\0';
3535-
35363532
// Handle "../" in filename...
35373533
while (!strncmp(filename, "../", 3))
35383534
{

0 commit comments

Comments
 (0)