Commit 257b6041 authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

Trim whitespace from input fields.

parent e1ab9f80
......@@ -155,6 +155,12 @@ def create_listing(request):
if listing_form.is_valid():
listing =
# Trim unnecessary whitespace chars from the sides.
listing.title = listing.title.strip() =
listing.edition = listing.edition.strip()
# Trim the word "by" if it starts the author field.
if len( >= 2 and[:2].lower() == "by": =[2:]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment