Public bug reported:

See https://mahara.org/interaction/forum/topic.php?id=7659

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="class1">Don't style me. But <span class="class2">style
me!</span></div>

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:

.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.

** Affects: mahara
     Importance: High
         Status: In Progress


** Tags: skin

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask 
on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1602447

Title:
  Can't use ">" CSS selector in skins

Status in Mahara:
  In Progress

Bug description:
  See https://mahara.org/interaction/forum/topic.php?id=7659

  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="class1">Don't style me. But <span class="class2">style
  me!</span></div>

  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:

  .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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1602447/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to     : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp

Reply via email to