diff options
-rw-r--r-- | core/views/uploads.py | 10 | ||||
-rw-r--r-- | parsers/logbooks.py | 7 |
2 files changed, 9 insertions, 8 deletions
diff --git a/core/views/uploads.py b/core/views/uploads.py index 0477835..136744b 100644 --- a/core/views/uploads.py +++ b/core/views/uploads.py @@ -215,11 +215,11 @@ def logbookedit(request, year=None, slug=None): place = request.POST["place"].strip().replace(' - ',' = ') # no hyphens ! title = request.POST["title"].strip() entry = request.POST["text"].strip() - entry = entry.replace('\r','') # remove HTML-standard CR inserted - entry = entry.replace('\n\n','\n<br />\n<br />\n') # replace 2 \n with <br><br> - entry = entry.replace('<p>','<br />\n<br') # replace <p> tag with <br><br> - entry = entry.replace('<p ','<br />\n<br') # replace <p> tag with attributes with <br><br> - entry = entry.replace('<br>','<br />') # clean up previous hack + entry = entry.replace('\r','') # remove HTML-standard CR inserted from form. + # entry = entry.replace('\n\n','\n<br />\n<br />\n') # replace 2 \n with <br><br> + # entry = entry.replace('<p>','<br />\n<br') # replace <p> tag with <br><br> + # entry = entry.replace('<p ','<br />\n<br') # replace <p> tag with attributes with <br><br> + # entry = entry.replace('<br>','<br />') # clean up previous hack tu = request.POST["tu"].strip() tu = clean_tu(tu) diff --git a/parsers/logbooks.py b/parsers/logbooks.py index 3789b4a..9e92dfc 100644 --- a/parsers/logbooks.py +++ b/parsers/logbooks.py @@ -59,7 +59,7 @@ LOGBOOK_PARSER_SETTINGS = { LOGBOOKS_DIR = "years" # subfolder of settings.EXPOWEB ENTRIES = { - "2023": 83, + "2023": 84, "2022": 94, "2019": 55, "2018": 95, @@ -408,8 +408,9 @@ def parser_html(year, expedition, txt, seq=""): place = triptitles[0] else: place = "Unknown" - tripcontent = re.sub(r"</p>", "", triptext) - tripcontent = re.sub(r"<p>", "<br /><br />", tripcontent).strip() + # tripcontent = re.sub(r"</p>", "", triptext) + # tripcontent = re.sub(r"<p>", "<br /><br />", tripcontent).strip() + tripcontent = triptext.strip() triptitle = triptitle.strip() # triptitle must be unique for a given date. [Why?!] We fix this here. |