2DU hace 8 años
padre
commit
16533791ac
Se han modificado 2 ficheros con 2 adiciones y 7 borrados
  1. 1 1
      app.py
  2. 1 6
      mark.py

+ 1 - 1
app.py

@@ -3064,7 +3064,7 @@ def error_test(num = None):
         data = '이미 로그인 되어 있습니다.'
     elif(num == 14):
         title = '파일 올리기 오류'
-        data = 'jpg, gif, jpeg, png만 가능 합니다.'
+        data = 'jpg, gif, jpeg, png, apng, webp만 가능 합니다.'
     elif(num == 15):
         title = '편집 오류'
         data = '편집 기록은 500자를 넘을 수 없습니다.'

+ 1 - 6
mark.py

@@ -734,12 +734,7 @@ def namumark(title, data, num, in_c):
                 
             b = re.search("^http(?:s)?:\/\/", results[0])
             if(b):
-                comp = re.compile("(?:\.(?:jpg|png|gif|jpeg))", re.I)
-                c = comp.search(results[0])
-                if(c):                    
-                    data = re.sub('\[\[(((?!\]\]).)*)\]\]', '<a class="out_link" rel="nofollow" target="_blank" href="' + results[0] + sharp + '">' + g + '</a>', data, 1)
-                else:
-                    data = re.sub('\[\[(((?!\]\]).)*)\]\]', '<a class="out_link" rel="nofollow" target="_blank" href="' + results[0] + sharp + '">' + g + '</a>', data, 1)
+                data = re.sub('\[\[(((?!\]\]).)*)\]\]', '<a class="out_link" rel="nofollow" target="_blank" href="' + results[0] + sharp + '">' + g + '</a>', data, 1)
             else:
                 if(results[0] == title):
                     data = re.sub('\[\[(((?!\]\]).)*)\]\]', '<b>' + g + '</b>', data, 1)