class name value throws error Invalid field: Link Class
That is because it is an invalid class
https://www.w3.org/TR/CSS21/syndata.html#characters
Originally posted by @brianteeman in #37529 (comment)
Labels |
Added:
No Code Attached Yet
|
that should mean that escaped characters should be allowed as class names.
However, escaping the @ still yields the same error
Forgive me for not being a mind reader.
@brianteeman github did this automatically... sorry
Title |
|
Title |
|
try to add uk-visible@m
as link class to any menu item
uk-visible@m
should be stored
class name value throws error Invalid field: Link Class
j4.1.2
a css clsass with @ in the name is invalid. Doesnt matter what you escape it with it is not valid.
Just try it with a basic html page and you will see it doess not work
If you write the classes with a escape, it works
.re\@d { color: red; } .uk-visible\@m { color: pink; }
I tried directly in the browser, I inserted a class with @
on an element and created the css definition, the browser added automatically the \
symbol
a css clsass with @ in the name is invalid. Doesnt matter what you escape it with it is not valid.
Just try it with a basic html page and you will see it doess not work
the w3 reference seems to talk about @ within a css file not as a class name in html
A class name with a @, escaped or not, in a HTML5 Class attribute is not permitted.
So you can't insert in a "class" field (for example a menu link class) in Joomla because it isn't a field that generate some CSS, but it fills an HTML Class attribute in the HTML source.
Ex:
<span class="red@2">NOT PERMITTED</span>
A class name with a @, escaped or not, in a HTML5 Class attribute is not permitted. So you can't insert in a "class" field (for example a menu link class) in Joomla because it isn't a field that generate some CSS, but it fills an HTML Class attribute in the HTML source.
Ex:
<span class="red@2">NOT PERMITTED</span>
@simbus82 this is directly described in the w3 doc which @brianteeman referred me to. and it specificaly states that
Identifiers can also contain escaped characters and any ISO 10646 character as a numeric code (see next item). For instance, the identifier "B&W?" may be written as "B&W?" or "B\26 W\3F".
so did you try with a numeric code
@brianteeman yup. same error
apparently it strips everything not alphanumeric
Not suprised - just wanted to be ceertain.
I personally still say it should not be valid to use an @ in the name of a class but I guess if someone is able to modify the cssvalidation rule in a secure way then it could be fixed.
Doesnt seem even a low priority
@brianteeman totally agree on the priority level.
Labels |
Added:
bug
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-08-10 07:47:22 |
Closed_By | ⇒ | alikon |
??