Commit Graph

240 Commits

Author SHA1 Message Date
Remy Sharp
df3619f89b
fix: update docs 2017-11-28 08:22:03 +00:00
Remy Sharp
0149f16c5d
fix: add Apple device specific link images
* apple device specific link images to data urls
* code styling
2017-11-21 22:14:40 +00:00
Antti Vähäkotamäki
3de3f89cf0 style: code styling 2017-09-25 12:39:44 +03:00
Antti Vähäkotamäki
b400f0cb81 feat: apple device specific link images to data urls 2017-09-25 12:39:17 +03:00
Remy Sharp
4361b37a35 fix: update docs 2017-09-04 20:54:10 +01:00
Rémi Emonet
1ef4ad8089 test: check and update failing url()-related tests 2017-08-25 22:01:04 +01:00
Rémi Emonet
ff2285312a fix: nested double quotes with url() in style
NB: using ' instead of ", and trying to escape properly
NB: tests results not updated yet
NB: '&' in an SVG text (still) not handled

Fixes #152
Fixes #153
2017-08-25 22:01:04 +01:00
Rémi Emonet
bf70e131be test: svg background also in a style attribute 2017-08-25 22:01:04 +01:00
Rémi Emonet
f0faa68730 test: trickier circle.svg to test escaping 2017-08-25 22:01:04 +01:00
positronium
c3cbdf0346 fix: spaces in file names
Fixes inlining local files with spaces in names.
Fixes #148.
2017-06-25 22:57:30 +01:00
Ildar Sagdejev
5786954e07 fix: Remove redundant trailing comma after inlined CSS @import
Fixes #142
2017-05-20 11:04:25 +01:00
Remy Sharp
64d218bb18 test: fix broken test plan & use glitch>now 2017-05-19 15:11:40 +01:00
Remy Sharp
20a5bcbfb0 test: remove version test 2017-04-27 19:19:51 +01:00
Remy Sharp
40845eeb3a chore: Merge branch 'master' of github.com:remy/inliner
* 'master' of github.com:remy/inliner:
  fix: don't corrupt whitespace in scripts
2017-04-05 10:58:14 +01:00
Remy Sharp
e9c0258a36 chore: pushing missing file 2017-04-05 10:57:37 +01:00
Remy Sharp
552851733c fix: don't corrupt whitespace in scripts
Fixes #120
2017-04-05 10:56:14 +01:00
John Ericson
83edb2bf54 feat: add iesafe option
Fixes #134
2017-04-05 09:10:46 +01:00
makoto tsuyuki
ef5433ccc7 feat: consider external end import css charset 2017-03-28 06:11:35 +01:00
makoto tsuyuki
b87a34d592 fix: uglify-js 2.8.0 changes output. 2017-03-28 06:11:35 +01:00
makoto tsuyuki
3fa5f7ea67 fix: spaceless @import cause infinite loop (#136) 2017-02-28 07:15:22 +00:00
Remy Sharp
bacf080d09 fix: add usage for preserve comments
And remove the `-c` shortcut as it'll be a lesser used option
2016-12-31 16:36:46 +00:00
Pierre Reimertz
a41ab78a95 feat: added preserveComments option 2016-12-31 16:34:27 +00:00
Joey Parrish
d53c651921 fix: detection of absolute URLs
If a URL is resolved before checking for absolute URLs, even relative
URLs will be detected as absolute.

Includes updates to the skip-absolute-urls test.

Closes #126
2016-11-17 11:20:13 -08:00
Joey Parrish
68c345ae8e feat: inline favicons with rel="shortcut icon"
If the page is using rel="shortcut icon" instead of rel="icon", the
author will be surprised that the icon was not inlined, and may not
notice.  It would be better to inline that icon.

Includes updates to the favicon tests.

Related to issue #126
2016-11-17 11:19:59 -08:00
Eugene Cheung
ae4c110976 docs: Suggest service worker instead of appcache (#115) 2016-08-13 18:11:49 +01:00
Remy Sharp
109555f690 fix: don't encode by default
Fixes #109
2016-08-09 22:05:33 +01:00
Remy Sharp
51ff9ddf97 fix: use basename instead of parse
To continue to have A+ support (specifically path.parse doesn't exist in node@0.10)
2016-07-31 15:53:53 +01:00
Remy Sharp
03f9ea6016 style: lint fixes 2016-07-31 15:38:47 +01:00
Remy Sharp
ba36b8216b fix: update deps (out of vuln range) 2016-07-31 15:38:46 +01:00
Remy Sharp
c085114ebf fix: ensure svg viewBox is kept
Fixes #102

Use lowerCaseAttributeNames=false when SVG present
2016-07-31 15:38:27 +01:00
Remy Sharp
0772d51069 fix: don't bail on corrupted URLs
Fixes #104

It will warn about them, but not fail the job, instead replacing the URL with '' (which is just as bad as the corrupted url, but at least it finishes).
2016-07-31 15:38:27 +01:00
Remy Sharp
0ae1301641 fix: don't remove SSI
Fixes #110
2016-07-31 15:38:26 +01:00
Cade Scroggins
701bf13678 fix: don't inline background images when the images option is false
also includes tests
2016-07-31 15:38:26 +01:00
Mikael Finstad
a2869fc81a fix: non-ascii characters
When doing a request with the node request module with an URL
containing UTF-8 chars, some webservers will fail to find the file.
Therefore encodeURI on the url before requesting it.
Not sure if this is the best way to test it, but it works with all test cases.

Example of page which doesn't inline properly:
http://hotpoticeland.com/holsgerdislaug/
which links to the image:
http://hotpoticeland.com/wp-content/uploads/Hólsgerðislaug-300x225.jpg
2016-07-31 15:38:26 +01:00
Remy Sharp
6a1dec4f4c fix: better reporting of progress
Also fixed left over count on styles
2016-07-31 12:59:08 +01:00
Remy Sharp
2f6cfc15be docs: fix help -H sample 2016-06-27 18:12:42 +01:00
Remy Sharp
ae44accdd0 tests: update for new parsing 2016-05-22 22:27:10 +01:00
Remy Sharp
734dafb136 fix: headers use colons
The headers option was supposed to mirror cURL, but they were wrongly splitting on `=` and not `:`. This fix updates.
2016-05-22 22:25:50 +01:00
Remy Sharp
9acbbcb351 fix: loose match on at-imports
Fixes #98
2016-05-22 22:25:19 +01:00
Remy Sharp
ba67ef1083 fix: when in debug, output verbose line-by-line 2016-05-22 22:24:37 +01:00
Remy Sharp
e61f7bd783 fix: header cli parsing 2016-05-22 15:13:01 +01:00
Remy Sharp
253a3173cd fix: wrap all CSS data urls in quotes
This ensures that if SVG is used as a background, it doesn't get corrupted.

Fixes #97
Fixes #96
2016-05-22 14:45:52 +01:00
Remy Sharp
cc9cc826ec chore: Merge branch 'ueokande-fix_forced_xml_mode'
* ueokande-fix_forced_xml_mode:
  fix: detect xml-mode with XML declaration
2016-05-21 16:25:27 +01:00
Shin'ya Ueoka
925c99e2c3 fix: detect xml-mode with XML declaration 2016-05-17 22:36:54 +09:00
Remy Sharp
0ddff8886f fix: local content should use fs for inlining
The issue here was that although the "simple" detection was in place if the URL looked like HTML (i.e. has an angle bracket in it), but it didn't ever set the `isFile` flag.

This fix corrects this, but also swallows ENOENT errors, to mirror >=400 response codes being swallowed (i.e. return an empty body).

Fixes #89
2016-04-20 21:42:48 +01:00
Remy Sharp
0840c84140 chore: skip test dir in npm pkg 2016-04-20 09:46:36 +01:00
Remy Sharp
8caf2c6693 chore: merge branch 'feature/clean-progress-output'
* feature/clean-progress-output:
  style: lint fixes
  feat: enhance and clean -v output
  fix: job counts (was missing JS + inline styles)
  feat: show status if output redirected
  fix: don't try to encode SVG if there's no body
2016-04-20 09:42:31 +01:00
Remy Sharp
072c387b63 docs: tidy help 2016-04-19 11:43:28 +01:00
Remy Sharp
731e7e9351 chore: merge branch 'feature/local-only'
* 'feature/local-only' of https://github.com/eigenuser/inliner:
  chore: renamed flag to --skip-absolute-urls
  chore: renamed flag to --same-origin-only
  feat: support for only inlining local files
2016-04-19 11:19:50 +01:00
Remy Sharp
0c0c063647 chore: ignore tmp folders 2016-04-19 11:19:40 +01:00