Skip to content
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

Added handling of MixedList's record IDs as a hidden filter so that c… #741

Closed
wants to merge 2 commits into from

Conversation

EreMaijala
Copy link
Contributor

…reating a URL or serializing/deserializing the search would work properly. Fixes RSS feeds, emailing the results and saving/removing search for Records/Home action.

Since hidden filters are a standard where params are handled, this is an easy way to persist them in all situations, though not very elegant.

Also added <> around the URL in the email since it prevents the URL from breaking in the email due to length or containing special characters (e.g. Thunderbird breaks on square brackets).

…reating a URL or serializing/deserializing the search would work properly. Fixes RSS feeds, emailing the results and saving/removing search for Records/Home action.
@crhallberg
Copy link
Contributor

Would it better to escape <> as &gt; &lt; or would that cause problems in plain text emails?

@EreMaijala
Copy link
Contributor Author

It would be wrong in plain text email. Plain angle brackets are a standard way of delimiting a URI in email (see e.g. ftp://ftp.rfc-editor.org/in-notes/rfc3986.txt Appendix C and help with long URLs that would otherwise wrap (and even if the link would initially work, it would often fail if forwarded as quoted.

@demiankatz
Copy link
Member

Ere,

Thanks for this! A few notes:

1.) I split out your template change to a separate commit since it is not directly related to this refactoring.

2.) I significantly simplified your code here: bed4955 -- the "id" hidden filter is now "ids", and it's tab-delimited instead of using a pseudo-Solr syntax. I think this reduces the chance of edge case problems. Since MixedList is backend-agnostic, it seemed best to use a compact and easy-to-parse format for the hidden filter representation.

3.) I noticed that saved MixedList searches didn't display very nicely, so I added a custom display query here: df55b33

Please let me know if you have concerns/problems with my changes! Thanks again!

@demiankatz demiankatz closed this Jul 6, 2016
@EreMaijala EreMaijala deleted the mixedlist-ids branch August 23, 2016 12:43
mbeh-ub added a commit to mbeh-ub/vufind that referenced this pull request Dec 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants