Providing no value for an optional numeric parameter results in
error "Parameter *** is invalid!"
This is caused by the validation function ignoring the 'required'
attribute when loading and checking input parameters.
This commit adds checks to determine whether the 'required' attri-
bute is defined and active before returning the error message.
References #570:
Loading the page with an URL fragement (#bridge-*) should result in
the bridge showing all parameters by default. Unfortunately this is
not possible using PHP, which is why a new JavaScript function is
needed (select.js)
That way, when returning from a bridge ('back to rss-bridge') will
keep the selected bridge active (only works for HTML format).
f757d7d1a5 introduced a bug where all
text input boxes were centered instead of just the search bar.
In order for this to work properly the global styles must be applied
before specific styles for the search bar.
The search bar doesn't feel right if the placeholder is centered,
while the text cursor is left-aligned. The cursor should appear
instead of the placeholder (at the same position).
Added styles to center the text cursor and hide the placeholder
when selecting the input field.
Tested in:
- Firefox 54 & 55
- Chromium 60 (compatible with Chrome 60)
- Microsoft Edge (partially working!)
--- Microsoft Edge ---
Due to a bug in the Microsoft Edge browser, the text cursor is not
centered as long as the placeholder is defined (which it is always)
More information:
https://stackoverflow.com/a/33224868
Official bug report:
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4468563/
----------------------
Whitespace at the beginning of feeds causes parsing errors. This is
an example using an ill-formatted RSS feed:
"XML or text declaration not at start of entity"
-- https://validator.w3.org
This commit automatically removes all proceeding and trailing white-
space from the source content before resume parsing.
On Oct 27, 2016 the discontinuation of Vine was announced:
https://medium.com/@vine/important-news-about-vine-909c5f4ae7a7
"Today, we are sharing the news that in the coming months we’ll be
discontinuing the mobile app."
https://vine.co/ is still online, but has been put into an archive
indefinitely. As the site does not allow further uploads, this
bridge serves no further purpose.
Matching whitelisted bridges using a case-insensitive match makes
sense for following reasons:
- Wrong upper/lower case spelling in the whitelist is not easily
discovered. Example: Misspelling 'Youtube' as 'YouTube' will not
show the 'Youtube' bridge (while it is expected to show)
- Two bridges with the same name but different letter casing are
discouraged to prevent confusion and keep the project compatible
with Windows machines
Tags are embedded in the 'title' attribute instead of 'alt' as
defined by the ancestor (DanbooruBridge).
The 'title' attribute also contains statistics data ('score:...',
'rating:...') that is now filtered by a custom implementation of
the 'getTags' function (elements that contain a colon are removed)
Closes#560
* The cache folder requires write permissions at all times
* The whitelist file requires write permissions if it does not
exist (can be created manually)
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