Final solution to the saltus problem
parent
5d68d55515
commit
32fccf46b0
|
@ -213,12 +213,7 @@
|
||||||
/* do not remove - fixes hand, talking, marsey-love components
|
/* do not remove - fixes hand, talking, marsey-love components
|
||||||
from breaking out of the comment box
|
from breaking out of the comment box
|
||||||
*/
|
*/
|
||||||
.comment-text a > img {
|
.comment-text a > img, img[data-user-submitted], .preview > img {
|
||||||
position: relative !important;
|
|
||||||
max-height: 150px !important;
|
|
||||||
margin: 0 !important;
|
|
||||||
}
|
|
||||||
.preview > img {
|
|
||||||
position: relative !important;
|
position: relative !important;
|
||||||
max-height: 150px !important;
|
max-height: 150px !important;
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
|
|
|
@ -78,6 +78,7 @@ def allowed_attributes(tag, name, value):
|
||||||
if name in {'g','b','glow','party'} and not value: return True
|
if name in {'g','b','glow','party'} and not value: return True
|
||||||
if name in {'alt','title'}: return True
|
if name in {'alt','title'}: return True
|
||||||
if name == 'class' and value == 'img': return True
|
if name == 'class' and value == 'img': return True
|
||||||
|
if name == 'data-user-submitted' and not value: return True
|
||||||
|
|
||||||
if tag == 'lite-youtube':
|
if tag == 'lite-youtube':
|
||||||
if name == 'params' and value.startswith('autoplay=1&modestbranding=1'): return True
|
if name == 'params' and value.startswith('autoplay=1&modestbranding=1'): return True
|
||||||
|
@ -527,6 +528,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis
|
||||||
a.append(tag)
|
a.append(tag)
|
||||||
|
|
||||||
tag["data-src"] = tag["data-src"]
|
tag["data-src"] = tag["data-src"]
|
||||||
|
tag["data-user-submitted"] = ""
|
||||||
|
|
||||||
sanitized = str(soup).replace('<html><body>','').replace('</body></html>','').replace('/>','>')
|
sanitized = str(soup).replace('<html><body>','').replace('</body></html>','').replace('/>','>')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue