Skip to content

Commit

Permalink
fix: Signaler visuellement les liens javascript dans les zones editor…
Browse files Browse the repository at this point in the history
…iales #wysiwyg ou .wysiwyg

Refs: https://git.spip.net/spip-team/securite/issues/4833
  • Loading branch information
Cerdic committed Jul 12, 2022
1 parent ad8ec04 commit d569096
Showing 1 changed file with 31 additions and 8 deletions.
39 changes: 31 additions & 8 deletions prive/themes/spip/content.css.html
Expand Up @@ -106,8 +106,31 @@

.chapo { font-weight: bold; color: #333; }

#wysiwyg a { /*color: #604A7F;*/ text-decoration: underline; }
#wysiwyg a:hover { /*color: #f57900;*/ text-decoration: underline; }
#wysiwyg a, .wysiwyg a { /*color: #604A7F;*/ text-decoration: underline; }
#wysiwyg a:hover, .wysiwyg a:hover { /*color: #f57900;*/ text-decoration: underline; }

/* Signaler les liens JS suspect */
#wysiwyg a[href*="javascript:"],
.wysiwyg a[href*="javascript:"] {
background: yellow;
pointer-events: none;
}
#wysiwyg a[href*="javascript:"]:after,
.wysiwyg a[href*="javascript:"]:after {
display: inline-block;
content: attr(href);
margin-left: 0.25em;
font-family: 'lucida console',monospace;
font-size: 0.85em;
font-weight: normal;
}
#wysiwyg a[href*="javascript:"]:before,
.wysiwyg a[href*="javascript:"]:before {
display: inline;
content: "⚠️";
margin-right: 0.25em;
text-decoration: none;
}

.boutonlien { font-weight: bold; font-size: 9px; }
a.boutonlien:hover { color: #454545; text-decoration: none; }
Expand All @@ -132,14 +155,14 @@
.puce_objet_fixe { position: relative; }

.puce_objet_popup, .puce_objet_popup * { box-sizing: content-box; }
.puce_objet_popup {
position: absolute;
visibility: hidden;
.puce_objet_popup {
position: absolute;
visibility: hidden;
border: 0px;
background-color: white;
padding: 0px;
z-index: 10;
top: -3px;
z-index: 10;
top: -3px;
box-shadow: 0 0 5px rgba(0,0,0,0.2);
border-radius: var(--spip-list-border-radius);
#ENV{left}: -7px;
Expand Down Expand Up @@ -279,4 +302,4 @@
h2.titrem { display: block; padding-top: 6px; padding-bottom: 4px; background-repeat: no-repeat;padding-[(#ENV{left})]:16px;background-color: #ENV{claire};font-size:14px;}

.aide .contenu-aide,.box_mediabox .contenu-aide {padding-top:[(#ENV{margin-bottom}|strmult{1.0})em];}
.box_mediabox .contenu-aide {min-width:450px;margin-right: 15px;}
.box_mediabox .contenu-aide {min-width:450px;margin-right: 15px;}

0 comments on commit d569096

Please sign in to comment.