Ignore everything after </h1> - gophercgis - Collection of gopher CGI/DCGI for geomyidae
HTML hg clone https://bitbucket.org/iamleot/gophercgis
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR changeset e973111eae7f9c130e4357dfbbbf252b2789d1d3
DIR parent d80b6967472516e3b0b7246f5219af7bbb9d2b41
HTML Author: Leonardo Taccari <iamleot@gmail.com>
Date: Mon, 10 Sep 2018 15:03:17
Ignore everything after </h1>
Otherwise if there is a <script> tag all the content can actually be ignored!
Diffstat:
rep/article.cgi | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff -r d80b69674725 -r e973111eae7f rep/article.cgi
--- a/rep/article.cgi Sun Sep 09 17:04:04 2018 +0200
+++ b/rep/article.cgi Mon Sep 10 15:03:17 2018 +0200
@@ -25,6 +25,7 @@
awk '
/<h1 class="detail-article_title"/,/<\/h1>/ {
sub(/^.*<h1 class="detail-article_title"/, "<h1")
+ sub(/<\/h1>.*/, "</h1>")
print
}
/<div class="detail-article_summary">/,/<\/div>/ {