All formats except HTML return & instead of & in URLs causing
all links with parameters (...&id=...) to break.
Facebook does not return valid HTML URIs but instead provides them
with all special characters encoded (like using htmlspecialchars).
This seems to be related to the page being build almost entirely of
script blocks.
This commit adds htmlspecialchars_decode() to URI and content to
reverse the encoding.
References #550
- Do not add spaces after opening or before closing parenthesis
// Wrong
if( !is_null($var) ) {
...
}
// Right
if(!is_null($var)) {
...
}
- Add space after closing parenthesis
// Wrong
if(true){
...
}
// Right
if(true) {
...
}
- Add body into new line
- Close body in new line
// Wrong
if(true) { ... }
// Right
if(true) {
...
}
Notice: Spaces after keywords are not detected:
// Wrong (not detected)
// -> space after 'if' and missing space after 'else'
if (true) {
...
} else{
...
}
// Right
if(true) {
...
} else {
...
}
Add additional information to error message:
- Name of the bridge
- Possible solutions
- Error description
- Error code
- Error message
* Output type changed from 'text' to 'html'
* Added styles for the error page
* Added a button to remotely open a GitHub issue
Closes#525
This replaces the 'novideo' parameter with 'media_type' in order
to filter for specific content types. Currently supported:
- 'all': Returns all posts (default)
- 'video': Returns only posts including videos
- 'novideo': Returns only posts that don't include videos
References #553
This adds a new option 'novideo' that can be set to 'on' or 'off'
in order to skip posts that include facebook videos (does not work
for linked videos like YouTube). This option is 'off' by default.
References #533
Adds a new option 'media_type' to select from three choices:
- 'all' (Both): Returns pictures and videos (default choice)
- 'picture': Returns only pictures
- 'video': Returns only videos
References #553
This fixes broken URIs in the output data caused by duplicate domain
names caused by sites (descendant class Delbooru) providing absolute
URIs instead of relative ones.
References #552
The title attribute includes tags (anchors) instead of raw text.
While this works fine in a browser, using a raw format like plain-
text or json breaks with expected behavior.
This commit changes the order in which functions are applied. By re-
moving anchors AFTER fixing the title, the final result does not
include tags and the title is still fixed.
This bug was introduced by d81b61ccfa
References: #546
Twitter now requires login to access "Tweets & Replies" which
breaks feeds using the default behavior. Using the "Without
replies" option still works.
This commit makes the "Without replies" option default. That way
existing feeds will return contents again. The parameter can still
be checked but its status has no effect anymore.
Notice: The parameter should not be removed as that would cause
any feed using the parameter to stop working because of "Invalid
parameter"
References #544
This commit improves readability of tweets by adding spaces before
anchors in the text.
- Hide "invisible" tags which were not rendered hidden because of
missing CSS.
- Fix spacing between anchors
Reported via #539
If no accepted languages are specified Facebook will guess your
language. This guess can go horribly wrong if your server does not
provide origin information.
This adds a context header with language information when retrieving
page contents. The accepted languages are read from the list of
accepted languages specified by the web browser of the requester.
References #530
This improves the translation of regular text to anchors by adding
support for additional characters '?&=-_' to fix common URLs.
Notice: The regex pattern is by no means complete. That means it is
likely to break in the future. More sophistiated solutions however
are insanely complex. See: http://stackoverflow.com/a/190405
References #520
Twitter provides an easy way to receive various image sizes based
on the same image URI:
https://dev.twitter.com/overview/api/entities-in-twitter-objects
We support different sizes: thumb, small, medium and large. The
media_url defaults to medium but you can retrieve the media in
different sizes by appending a colon + the size key (for example:
https://pbs.twimg.com/media/A7EiDWcCYAAZT1D.jpg:thumb).
-- Twitter Developer Documentation
TwitterBridge now makes use of this feature in order to provide
thumbnail images in the content and original sized images as
enclosures.
References #526
Previously feed contents were rendered as one block of text with
no structure. This brings back the structure of original video
descriptions and makes links in the description work again.
References #520
Re-requesting the same feed in normal mode (not debug mode)
returns the cached version. The name and URI of the feed
however was not returned.
This adds checks to getName() and getURI() in order to return
the cached infos when using the cached version.
Notice: For this to work correctly all bridges must call to
parent::getName() and parent::getURI() respectively if the
queriedContext is not defined. Example:
switch($this->queriedContext){
case 'My context':
// do your stuff here!
break;
default: parent::getName();
}
This adds new features to show quotes and pictures in feeds.
Quotes will show up on top of a tweet and are separated from
the quoting feed by a horizontal line.
Pictures that are embedded in the tweet will be captured and
attached to the feed using enclosures. By default the picture
will also be shown in the feed itself. This can be disabled
using the option '&noimg=on'
Some codes are now split into separate functions so they can be used
for tweets and quotes alike.
Changed behaviour of the checkbox to use the custom parser when
active. That way if the parameter is missing the default value
applies and the feed returns from the provided RSS
Reported via #498
Previously summary posts were ignored which resulted in the last
two posts not showing up in the feed (the latest two are shown in
the summary post).
Now summary posts are treated like regular posts, returning them
as part of the regular feed.
References #502, #505
Due to breaking DOM changes this bridge required re-implementation.
With this fix the brige will make use of the JSON data embedded in
the returned HTML. The content returned for all contexts is similar
with only a few differences due to limitations of the JSON.
Feeds returned for a given username and board will by default make
use of the provided RSS feed instead of using the custom filter.
This bahaviour can be changed by setting the optional parameter
'&r=off' (on by default)
Notice: The JSON data for userdata and search results is very
different, so two functions were implemented to account for that.
References #498
* const DOMAIN is not supported, it must be const URI
* strtotime should be used instead of date_parse in order to
receive a valid integer
* Some small readability enhancement