ect (or 2du) 8 лет назад
Родитель
Сommit
edaeb762bd
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      set_mark/link.py

+ 2 - 2
set_mark/link.py

@@ -144,7 +144,7 @@ def link(conn, title, data, num, category, backlink):
                 elif(re.search('^#', d[0])):
                 elif(re.search('^#', d[0])):
                     data = link.sub('<a title="' + sh + '" href="' + sh + '">' + view + '</a>', data, 1)
                     data = link.sub('<a title="' + sh + '" href="' + sh + '">' + view + '</a>', data, 1)
                 else:                    
                 else:                    
-                    a = href.replace('&#x27;', "'").replace('&quot;', '"').replace('\\\\', '<slash>').replace('\\', '').replace('<slash>', '\\')
+                    a = re.sub('<([^>]*)>', '', href.replace('&#x27;', "'").replace('&quot;', '"').replace('\\\\', '<slash>').replace('\\', '').replace('<slash>', '\\'))
                     
                     
                     if(num == 1):
                     if(num == 1):
                         backlink += [[title, a, '']]
                         backlink += [[title, a, '']]
@@ -158,7 +158,7 @@ def link(conn, title, data, num, category, backlink):
                     else:
                     else:
                         no = ''
                         no = ''
                     
                     
-                    data = link.sub('<a ' + no + ' title="' + re.sub('<([^>]*)>', '', href) + sh + '" href="/w/' + url_pas(re.sub('<([^>]*)>', '', a)) + sh + '">' + view.replace('\\', '\\\\') + '</a>', data, 1)
+                    data = link.sub('<a ' + no + ' title="' + re.sub('<([^>]*)>', '', href) + sh + '" href="/w/' + url_pas(a) + sh + '">' + view.replace('\\', '\\\\') + '</a>', data, 1)
         else:
         else:
             break
             break