Improved whitespace removal

Testresults
This commit is contained in:
Ozzie Isaacs
2024-08-12 18:41:20 +02:00
parent 5f81084e66
commit 87b82424d5
14 changed files with 115 additions and 127 deletions

View File

@@ -24,9 +24,9 @@ from flask_babel import format_date
from flask_babel import gettext as _
from sqlalchemy.sql.expression import func, not_, and_, or_, text, true
from sqlalchemy.sql.functions import coalesce
from sqlalchemy import exists
from . import logger, db, calibre_db, config, ub
from .string_helper import strip_whitespaces
from .usermanagement import login_required_if_no_ano
from .render_template import render_title_template
from .pagination import Pagination
@@ -267,11 +267,11 @@ def render_adv_search_results(term, offset=None, order=None, limit=None):
description = term.get("comment")
read_status = term.get("read_status")
if author_name:
author_name = author_name.strip().lower().replace(',', '|')
author_name = strip_whitespaces(author_name).lower().replace(',', '|')
if book_title:
book_title = book_title.strip().lower()
book_title = strip_whitespaces(book_title).lower()
if publisher:
publisher = publisher.strip().lower()
publisher = strip_whitespaces(publisher).lower()
search_term = []
cc_present = False