Can't use ">" CSS selector in skins
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Unassigned | ||
15.04 |
Fix Released
|
High
|
Unassigned | ||
15.10 |
Fix Released
|
High
|
Unassigned | ||
16.04 |
Fix Released
|
High
|
Unassigned | ||
16.10 |
Fix Released
|
High
|
Unassigned |
Bug Description
See https:/
The ">" character is a basic selector in CSS, which allows you to specify an element contained within another element. For example, "div.class1 > span.class2" would match the span in
<div class="
If you try to use a ">" in the "Custom CSS" section of a Mahara skin, it gets turned into "\3E". Probably it's being accidentally over-escaped at some point, because ">" is a syntactically important character in HTML.
To replicate:
1. Create a Mahara skin
2. On the skin editor go to the "Advanced" tab
3. In "Custom CSS" enter this:
body > .main-content > .row {
background-color: red;
}
4. Click "Save" (this closes the skin editor)
5. Edit the skin again, and navigate back to the Advanced tab.
Expected result: The "Custom CSS" field shows what you entered before
Actual result: The ">" in the Custom CSS field has been turned into "\3E".
Further test:
1. Apply the skin you selected in the previous test, to a Mahara page.
2. View the page in display mode.
Expected result: The page background is red.
Actual result: No change in the the appearance of the page.
description: | updated |
Changed in mahara: | |
milestone: | 16.10.0 → none |
status: | Fix Committed → Fix Released |
Marking this one as "high" priority because it looks obviously broken to the end-user.