Aaron Parecki
5e60e13b5a
add h-recipe
closes #24
7 years ago
Aaron Parecki
5d8fb4e13c
support h-review and h-product vocab
* closes #23
* major refactor of the methods for extracting properties to consolidate the logic
* hReview parsing is incomplete due to issues with the php-mf2 backcompat parsing. see https://github.com/indieweb/php-mf2/issues/107
7 years ago
Aaron Parecki
bc74919ade
return status code and final URL in response
* closes #14
* updated readme with details of the response
* includes `url` and `code` in the response with the final URL after following redirects and the HTTP status code returned
7 years ago
Aaron Parecki
693cb9d636
use p3k\timezone library
7 years ago
Aaron Parecki
4a08c1fd2f
package for releasing to shared servers
* adds .htaccess files for apache
* adds installation instructions and nginx example
* prevent source folders from being viewed with .htaccess
* adds `index.php` in root folder in case you deploy this whole thing to a subfolder
* updates to work when installed in a subfolder
7 years ago
Aaron Parecki
876d4696fb
catch non-expanded profile URLs
apparently some people's profile URLs don't get t.co'd
7 years ago
Aaron Parecki
755fe8c222
fix positive timezones and case-insensitive username check
7 years ago
Aaron Parecki
ebea6869e1
set UTF-8 for mb_substr
attempting to fix in php 5.5
7 years ago
Aaron Parecki
0beac036b9
add twitter support
closes #18
7 years ago
Aaron Parecki
db8dba9f23
include published date for Instagram photos
if the photo has a location, the timezone is set on the published date
7 years ago
Aaron Parecki
773252559d
parse instagram photos and videos
7 years ago
Aaron Parecki
2f9f80c4e6
remove unused function
7 years ago
Aaron Parecki
3bdafad98e
parse URLs with fragment IDs
If the input URL contains a fragment, finds the DOM tree at that ID and runs the subtree through the mf2 parser.
closes #15
8 years ago
Aaron Parecki
1a1215c0be
attempt to catch fatal errors and print a nice message
8 years ago
Aaron Parecki
a7780fb671
set connect timeout
8 years ago
Aaron Parecki
565d50b862
add token fetching and authentication for posts
8 years ago
Aaron Parecki
62697ee46b
strict type checking on properties
8 years ago
Aaron Parecki
1f6de10aba
add tests for validating URL fields
* fields that should be URLs will now be omitted if the value was not a URL, such as when the value is `javascript:alert()`
* makes Mf2 class slightly more self-contained by duplicating the URL helper functions into it
* fixes tests to not cache responses in memcache
8 years ago
Aaron Parecki
5672004535
remove url param since it was not used
8 years ago
Aaron Parecki
4a82561536
fix for h-event parsing
8 years ago
Aaron Parecki
1aa2f01d94
convert hostnames to lowercase
8 years ago
Aaron Parecki
138cddd158
also return audio property
8 years ago
Aaron Parecki
6de9be2567
parse h-event
closes #9
8 years ago
Aaron Parecki
ee5e48e1ef
if there is exactly one item and it's an h-entry, use that
8 years ago
Aaron Parecki
9054b0947c
specific error when there is no content at the URL
8 years ago
Aaron Parecki
1924d1000e
add log messages to debug which case a URL is hitting
8 years ago
Aaron Parecki
b7f49a7958
fix should follow redirects check
8 years ago
Aaron Parecki
8dc0caa4d0
use effective URL after following redirects when comparing URLs
8 years ago
Aaron Parecki
162d2f5ef8
add tests for feeds, catch case when a permalink has other h-entrys
8 years ago
Aaron Parecki
e3000f8c06
better blacklist for google URLs
8 years ago
Aaron Parecki
c4b80506da
support parsing posted HTML
8 years ago
Aaron Parecki
8d1489bb72
fix for target param. include bookmark-of property
8 years ago
Aaron Parecki
075f78a6c1
parse h-entry even if it's not the first objet
8 years ago
Aaron Parecki
d7672df96c
allow ul/li/ol
8 years ago
Aaron Parecki
e3ff109b37
restrict matching mf2 classes to only lowercase names
see http://microformats.org/wiki/microformats2-parsing-issues#ignore_u-camelCase_properties for background
8 years ago
Aaron Parecki
66a9b1cc9e
sanitize HTML in the entry
allow only a basic set of tags, and remove any non-mf2 classes
closes #2
8 years ago
Aaron Parecki
241594dcf5
sanitize HTML
sanitize the HTML returned in the content property. allows a common set of HTML tags.
for #2
8 years ago
Aaron Parecki
b9c9a6bddd
fix for author parsing
8 years ago
Aaron Parecki
ac6d86c0db
includes nested h-cite and other objects
if a property such as `in-reply-to` is an h-cite, the URL is still returned as the `in-reply-to` value, and the h-cite object is available in a different part of the response.
closes #6
8 years ago
Aaron Parecki
ed88b4881b
use file_get_contents only for appengine URLs
8 years ago
Aaron Parecki
e09ee58d8b
sometimes it returns "request failed"
file_get_contents is dumb. I hope this isn't a permanent solution.
8 years ago
Aaron Parecki
2924f35e0d
fix tests for new HTTPStream
8 years ago
Aaron Parecki
82931e46bc
switch to using file_get_contents for appengine
8 years ago
Aaron Parecki
7b955b53f2
don't follow redirects on appengine URLs
see https://cloud.google.com/appengine/docs/php/urlfetch/
8 years ago
Aaron Parecki
7fafb51e92
add todo note for feeds
8 years ago
Aaron Parecki
7075254d56
add / to URL if it doesn't have a path
8 years ago
Aaron Parecki
0d96cb2832
also return matching url for h-cards
8 years ago
Aaron Parecki
fff43444f5
also return categories
8 years ago
Aaron Parecki
69223cad1d
return matching author url
8 years ago
Aaron Parecki
e9bc4bf450
rename to X-Ray
8 years ago