errorlib: fix Sentry context syntax issue

* Fixes Python syntax issue that slipped in the Sentry context support
  commit d73bd94b2fbe8666af31dfec25c334c466e6f6df.
  (addresses #1960) (PR #2147)

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
WebComment: general comment format improvements

* Introduces the CFG_WEBCOMMENT_ENABLE_HTML_EMAILS config variable.
  When True, emails will also include HTML content.

* Introduces the body_format column for cmtRECORDCOMMENT that describes
  the format of the body of each comment ("HTML", "TEXT", etc.).

* Handles comments appropriately when storing and displaying them,
  according to their body format and desired output format. (closes #2064)

Co-Authored-By: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
Signed-off-by: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
WebComment: Add & amend tests, fix SQL statement

* Adds and amends unit tests.

* Fixes the SQL create statement for cmtRECORDCOMMENT.

* Improves the upgrade script.
BibCirculation: fix for CERN returnees

Acked-by: Tibor Simko <tibor.simko@cern.ch>
WebSearch: fix for snippet highlighting

* Highlights terms that are only searched in fulltext.

Signed-off-by: Patrick Glauner <patrick.oliver.glauner@cern.ch>
WebNews: New module to display and manage news

* The WebNews module that will be responsible for presenting the site's news
  to the users and keeping a history of them. (addresses #1288)

* This first release includes the tooltip functionality and the database
  structure.
WebLinkback: faster email notification

 * Improves database layer to send email notification faster

 * Extends regression tests for this improvement

 * Applies minor clean-up
SolrUtils: reliable regression test suite

* Makes test suite independent from PDF extraction process.
  (closes #1590)

* Simplifies test suite

Signed-off-by: Patrick Glauner <patrick.oliver.glauner@cern.ch>
WebLinkback: faster deletion of linkbacks on blacklist

 * Avoids redundant creations of blacklist
WebSearch: new parsing of unbalanced phrase queries

* Removes unbalanced double quotation marks.

Signed-off-by: Patrick Glauner <patrick.oliver.glauner@cern.ch>
Merge pull request #28 from pglauner/master-solr-regression-tests

SolrUtils: reliable regression test suite
WebSearch: new fulltext by default search

 * Adds checkbox to search terms also in to fulltext to the add
   to search interface.

Signed-off-by: Patrick Glauner <patrick.oliver.glauner@cern.ch>
Merge pull request #29 from pglauner/master-search-units-phrase

WebSearch: new parsing of unbalanced phrase queries
BibRank: Solr: better ranking for fulltext by default

 * Ranks fulltext and metadata properly

Signed-off-by: Patrick Glauner <patrick.oliver.glauner@cern.ch>
Solrutils: more accurate ranking scores

 * Ceils ranking scores to avoid anomalies

Signed-off-by: Patrick Glauner <patrick.oliver.glauner@cern.ch>
Merge pull request #30 from pglauner/master-fulltext-by-default

See last comment in <http://github.com/CERNDocumentServer/cds-ops/pull/30>
regarding kwargs.
BibRecord: new MARC code filter

* Filters a record based on MARC code

* Supports wildcards in identifiers and subfield code

Signed-off-by: Patrick Glauner <patrick.oliver.glauner@cern.ch>
BibFormat: new 'xmf' format

* Supports filtering per MARC tag, identifier and subfield

Signed-off-by: Patrick Glauner <patrick.oliver.glauner@cern.ch>
Merge pull request #31 from pglauner/master-xm-fielded

Master xm fielded
Upgrades: safer new bibdocfile model upgrade

* Uses the get() method instead of __getitem__() defaulting the return
  value to an empty dictionary in case of missing keys in more_info.