Replies

Nov 14, 2017 8 years ago
Sorcerer
is a worthy opponent
User Avatar
Forsake

This probably isn't new, but pet profile code is being interpreted in some very interesting ways. Made examples, with comments, here's the breakdown.

1. Chid combinator breaks preceding code, and itself. What is should do

  • global red background
  • make h1 > span red What it does
  • makes all spans red

View Example <style> /* is cancelled */

  • {background:red;}

/* interpreted as span */ h1 > span {background:red;} </style>

2. Right angle bracket in comment breaks all code. What is should do

  • global red background What it does
  • nothing

View Example <style> /* is cancelled */

  • {background:red;}

/>/

/* is cancelled */

  • {background:red;} </style>

3. Attribute selector does not work. What it should do

  • underline matched divs (generic)
  • undo underline on matched divs (specific)
  • undo background on matched divs (specific) What it does
  • applies underline, nothing else

View Example <style> /* works fine */ div[style] { text-decoration: underline; }

/* does nothing */ div[style^='background'] { text-decoration: none; }

/* does nothing */ div[style='background-color:'] { background: none; } </style>

"> This should be highlighted.
"> This should not.
[edit]The backslash curse strikes again, here's the code on pastebin.
Nov 14, 2017 8 years ago Official
Bug
User Avatar
Segfault

Use single quotes in your CSS and avoid double quotes and great than/less than signs in the CSS as they get caught in the filter. Haven't looked yet but I'm guessing the double quotes are why the attribute selector fails.

These are a wontfix because there exist workarounds that allow you to do almost anything, and the filter we have on it is necessary. I agree that there is room for improvement but it isn't a problem or priority right now.

🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights

Nov 14, 2017 8 years ago
Sorcerer
is a worthy opponent
User Avatar
Forsake

Wontfix is fine, wanted to report anyway (especially />/ destroying code in both directions). Lock 'er up.

Thanks for answering so quickly, you're the only bug I like ;p

Single quotes work! (was avoiding because of escape clutter)

Nov 14, 2017 8 years ago Official
Bug
User Avatar
Segfault

The escapes might be an easy fix so I'll look into it if I have time :) It's just low priority since the feature still works correctly and there is a lot on my plate.

🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights

Please log in to reply to this topic.