-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some 2.19 regressions and improve twitter and github spouts #1367
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for selfoss ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
jtojnar
changed the title
Random fixes
Fix some 2.19 regressions and improve twitter and github spouts
Oct 9, 2022
Since we ported the client to React, most of the strings are treated as plain text, which is the default behaviour to prevent XSS and other security issues. Search mode injects HTML markers into `title`, `content` and `sourcetitle` fields, though. And while `title` and `content` are already HTML, so we do not need to do anything there, `sourcetitle` is treated like a plain text so the marker HTML tags would be displayed verbatim. Let’s strip the markers out and replace them with actual tags. Ideally, we would just highlight on the client side to also allow searching in offline mode. But until then this hack will have to do.
Variable $previousUseErrors might not be defined.
URLSearchParams would just turn it to `"null"`. Let’s use JSON so that we can go with other value types than string.
It is used by Readability library used by Graby and it will be mandatory once we update to Graby 2.0.0.
This is important when having the title auto-filled when creating the source.
Previously we would show it in the title but author field is obviously more correct.
It is supposed to be a plain text field, even though SimplePie escapes it. We are already decoding it. We are not updating existing fields in the database since, even though it is improbable that a text that looks like escaped HTML would be used as an author, it cannot be fully ruled out. If you want to do it, you can run the following SQL code: UPDATE items SET author = REPLACE(REPLACE(REPLACE(author, '>', '>'), '<', '<'), '&', '&') Fixes: #1317
This raises API version, since previously the value would be an empty string when there was no author. Also update the database contents, replacing empty authors with `null`, so that clients can just rely on `null` author meaning ”no author”.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix some 2.19 regressions.