Added more browsers and added support for open source with a slash in it.
This commit is contained in:
parent
e3c1809d81
commit
96e0286003
1 changed files with 5 additions and 1 deletions
|
@ -24,9 +24,13 @@ def html(page, json):
|
|||
|
||||
# Few words about it
|
||||
comment = json.get("comment","")
|
||||
if "open source" in comment.lower():
|
||||
not_foss = ['open source', 'open-source']
|
||||
if "open source" or "open-source" in comment.lower():
|
||||
# Well... Here is a thing. Free Software, not open source.
|
||||
where = comment.lower().find("open source")
|
||||
# In case it has a slash in it.
|
||||
if where == -1:
|
||||
where = comment.lower().find("open-source")
|
||||
os = comment[where:where+11]
|
||||
comment = comment.replace(os,
|
||||
"<a href=\"https://www.gnu.org/philosophy/open-source-misses-the-point.en.html\">"+os+"</a>")
|
||||
|
|
Loading…
Reference in a new issue