Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Approved PM markup?

by BrowserUk (Pope)
on Jun 28, 2015 at 03:21 UTC ( #1132318=monkdiscuss: print w/replies, xml ) Need Help??

Why is it that <div> is allowed, and <span> is not? Is there some particular vulnerability connected with <span>?

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!

Replies are listed 'Best First'.
Re: Approved PM markup?
by kcott (Bishop) on Jun 28, 2015 at 03:54 UTC

      Seems you're right. Though without the ability to supply inline styling (or at least an id) it might as well be totally disallowed.

        The lack of a style attribute was also my first thought; however, on reflection, it's really a lack of a style element that's the (bigger) problem.

        To elaborate on that, I have a script which generates HTML containing syntax-highlighted code, that looks something like this:

        <pre class="syntax-highlight"> ... <span class="variable">x</span> <span class="operator">=</span> <s +pan class="string">... ... </pre>

        While I wouldn't want to change, for example, every <span class="string"> instance to, say, <span style="color: #00ff00; background-color: #000000">; I might like to add one simple block like:

        <style> ... pre.syntax-highlight > span.string { color: #00ff00; background-color: #000000; } ... </style>

        However, beyond that, which really just shifts the focus of where style is missing from, I do agree with you. id is not an allowed attribute for any allowed element; the lang and dir attributes are only allowed with the blockquote element; and so on.

        There may be reasons why things are this way. Perhaps someone from pmdev could provide some feedback.

        -- Ken

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: monkdiscuss [id://1132318]
Approved by planetscape
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2021-10-22 01:43 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (85 votes). Check out past polls.