aboutsummaryrefslogtreecommitdiffstats
path: root/file.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-08-29Somehow the wrong quotes were used. This should fix the failing tests.Ambrose Li1-2/+2
2020-08-29wip from about a week ago. Need to stash these away for now to check the q ↵Ambrose Li1-0/+1
branch
2020-08-25In HTML5 anchors should not be closed when encountering divs, for example, ↵Ambrose Li1-3/+22
but should be closed when encountering buttons, for example. Many sites that use HTML5-style anchors end up having links displayed with zero-length link texts. The proposed patch correct this behaviour by detecting whether the document is HTML5, then suppressing the close-anchor action in CLOSE_A if it's an HTML5 document. A new macro handles the HTML5-specific cases where anchors are not already always closed. This also fixes a bug in the tokenizing FSM in etc.c that prevented the !doctype element from being recognized; the fix is necessary because HTML5 detection depends on checking the !doctype element.
2020-08-24Cleaned version of 20200823_q branch. Changes the behaviour of the q tag ↵Ambrose Li1-0/+18
(when m17n and Unicode are configured) to use "smart" quotes if the display charset can handle them. Falls back to old behaviour (ASCII quotes with left/right quote semantics for 6/0 and 2/6) if display charset is us-ascii. Also changes the behaviour of conv_entity() to convert left/right quotes and some dashes because named entities are needed for the new code for the q tag.
2020-08-21Rudimentary support for figure, figcaptionAmbrose Li1-0/+4
2018-03-04Add error handling code for fopenJia Zhouyang1-2/+6
Check the return value of fopen, and add proper error handling code.
2017-08-23file.c: compute correct base URL when not absoluteKyle J. McKay1-1/+1
When a server makes use of the PATH_INFO feature in a CGI, the returned pages may often have a <base href="..." /> tag specifying the URL of the CGI itself as the base. However, to avoid hard-coding the scheme and host into such a base href, the href value will often omit the scheme, host and port. Make sure that when parsing any such base href value that any omitted components are taken from the current URL rather than taken as being from a bare, absolute file:/// URL. Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
2016-12-17Prevent heap-use-after-free read in HTMLlineproc0()Tatsuya Kinoshita1-1/+1
Bug-Debian: https://github.com/tats/w3m/issues/81
2016-12-17Prevent infinite loop in feed_textarea()Tatsuya Kinoshita1-1/+3
Bug-Debian: https://github.com/tats/w3m/issues/85
2016-12-15Prevent overflow beyond the end of string in caller of get_mclen()Tatsuya Kinoshita1-1/+1
Bug-Debian: https://github.com/tats/w3m/issues/59 Bug-Debian: https://github.com/tats/w3m/issues/73 Bug-Debian: https://github.com/tats/w3m/issues/74 Bug-Debian: https://github.com/tats/w3m/issues/76 Bug-Debian: https://github.com/tats/w3m/issues/79 Bug-Debian: https://github.com/tats/w3m/issues/80 Bug-Debian: https://github.com/tats/w3m/issues/83 Bug-Debian: https://github.com/tats/w3m/issues/84
2016-12-15Revert "Prevent overflow beyond the end of string in proc_mchar()"Tatsuya Kinoshita1-6/+1
This reverts commit 512ed467d12615f5ef40d0d28272e5662d8438ea.
2016-12-15Revert "Prevent overflow beyond the end of string in proc_mchar()"Tatsuya Kinoshita1-6/+5
This reverts commit e79d0ec2a00369a6af24007a1f2bb5e876e2c847.
2016-12-13Prevent overflow beyond the end of string in proc_mchar()Tatsuya Kinoshita1-5/+6
Bug-Debian: https://github.com/tats/w3m/issues/80 cf. https://github.com/tats/w3m/issues/59
2016-12-07Prevent heap-use-after-free in HTMLlineproc0()Tatsuya Kinoshita1-1/+2
Bug-Debian: https://github.com/tats/w3m/issues/65
2016-12-07Prevent negative values for offset and pos in push_link()Tatsuya Kinoshita1-2/+6
Bug-Debian: https://github.com/tats/w3m/issues/64
2016-12-07Prevent overflow beyond the end of string in proc_mchar()Tatsuya Kinoshita1-1/+6
Bug-Debian: https://github.com/tats/w3m/issues/59
2016-12-05Prevent negative array index in process_textarea()Tatsuya Kinoshita1-1/+1
Bug-Debian: https://github.com/tats/w3m/issues/58
2016-12-05Prevent negative array index for marks in HTMLlineproc2body()Tatsuya Kinoshita1-1/+1
Bug-Debian: https://github.com/tats/w3m/issues/61
2016-12-05Prevent negative value of row for pushTable() in HTMLlineproc0()Tatsuya Kinoshita1-0/+2
Bug-Debian: https://github.com/tats/w3m/issues/67
2016-12-05Prevent negative array index in getMetaRefreshParam()Tatsuya Kinoshita1-2/+3
Bug-Debian: https://github.com/tats/w3m/issues/63
2016-11-27fix uninitialized variable in process_img(). fix #44Kuang-che Wu1-1/+1
2016-11-17Prevent deref null pointer in HTMLlineproc0()Tatsuya Kinoshita1-5/+5
Bug-Debian: https://github.com/tats/w3m/issues/42
2016-11-15Prevent infinite recursion with nested table and textareaTatsuya Kinoshita1-0/+1
Bug-Debian: https://github.com/tats/w3m/issues/20#issuecomment-260590257
2016-11-14Prevent null pointer deref due to bad form idTatsuya Kinoshita1-1/+4
Bug-Debian: https://github.com/tats/w3m/issues/39
2016-11-14Prevent array index out of bounds for symbolTatsuya Kinoshita1-1/+1
Bug-Debian: https://github.com/tats/w3m/issues/38
2016-11-13Prevent null pointer dereference in HTMLlineproc2body for textarea_intTatsuya Kinoshita1-1/+1
Bug-Debian: https://github.com/tats/w3m/issues/32#issuecomment-260170163
2016-11-07Prevent infinite recursion in HTMLlineproc0Tatsuya Kinoshita1-8/+8
Bug-Debian: https://github.com/tats/w3m/issues/36
2016-11-07Prevent crash after allocate string of negative sizeTatsuya Kinoshita1-0/+6
Bug-Debian: https://github.com/tats/w3m/issues/33
2016-11-06Prevent memory exhausted due to repeat appending "</table>"Tatsuya Kinoshita1-0/+3
Bug-Debian: https://github.com/tats/w3m/issues/23
2016-11-06Prevent null pointer dereference in HTMLlineproc2bodyTatsuya Kinoshita1-1/+1
Bug-Debian: https://github.com/tats/w3m/issues/32
2016-08-19Fix uninitialised values for <i> and <dd>Tatsuya Kinoshita1-0/+6
Bug-Debian: https://github.com/tats/w3m/issues/16
2016-08-19Revert "Fix uninitialised values for <i> and <dd>"Tatsuya Kinoshita1-6/+0
This reverts commit 0fba2f1a6eb6861206ad120a02af2643938082cd. cf. https://github.com/tats/w3m/commit/0fba2f1a6eb6861206ad120a02af2643938082cd#commitcomment-18703355
2016-08-19Fix uninitialised values for <i> and <dd>Tatsuya Kinoshita1-0/+6
Bug-Debian: https://github.com/tats/w3m/issues/16
2016-08-18Prevent segfault with malformed input_altTatsuya Kinoshita1-3/+3
Bug-Debian: https://github.com/tats/w3m/issues/18
2016-08-17Prevent segfault with incorrect button typeTatsuya Kinoshita1-0/+11
Bug-Debian: https://github.com/tats/w3m/issues/17
2016-08-17Prevent segfault with incorrect form_int fidTatsuya Kinoshita1-2/+3
Bug-Debian: https://github.com/tats/w3m/issues/15
2016-08-17Prevent negative array index for selectnumber and textareanumberTatsuya Kinoshita1-4/+4
Bug-Debian: https://github.com/tats/w3m/issues/12
2016-08-16Truncate large values of table attributesTatsuya Kinoshita1-0/+9
Bug-Debian: https://github.com/tats/w3m/issues/11
2016-08-08Prevent segfault with malformed input typeTatsuya Kinoshita1-4/+6
Bug-Debian: https://github.com/tats/w3m/issues/7
2016-03-29Fix mistake of unescape spaces for _doFileCopyTatsuya Kinoshita1-1/+1
cf. [w3m-dev-en 00751], [w3m-dev-en 00752] on 2002-06-09
2015-09-06Do not use C99-style commentsTatsuya Kinoshita1-3/+3
2015-09-06Mitigate issue #16 found by @kcwuDavid Crosby1-9/+11
2015-08-11Remove unused valueDavid Crosby1-1/+0
2015-08-11Remove dead assignments flagged by Clang static analysisDavid Crosby1-1/+0
2015-08-11Fix resource leak in AuthDigestCredDavid Crosby1-1/+3
2015-07-25Initialise hidden_input to NULLRichard Quirk1-1/+1
This prevents a possible use of garbage value on line 3017.
2015-07-25use pclose for pipeRichard Quirk1-1/+1
2015-02-02New option "display_borders" to display 0 pixel table borders.Tatsuya Kinoshita1-0/+2
cf. http://d.hatena.ne.jp/rubikitch/20101120
2014-12-06Add -sixel option which supports image processing by img2sixel.Araki Ken1-3/+3
2014-12-06* file.c: nw and ni are rounded up instead of rounded off to show every ↵Araki Ken1-2/+8
corner of images.