Copyright pop-up HTML content not rendering
|Assignee:||Douglas Cerna||% Done:|
|Target version:||Release 2.5.2|
|Google Code Legacy ID:||Tested version:||2.5|
In issue #8771 we added a customizable pop-up that administrators can configure so a user must agree to specific terms of access before being able to view a master digital object. This copyright pop-up should allow users to add HTML and inline CSS to style the content. In issue #8886 we further added the ability for users to preview their custom HTML in a new page. This functionality is described in the 2.5 user manual here:
Also in the 2.5 release, we introduced Markdown support for formatting, in issue #12148.
Currently it appears that the addition of markdown is interfering with the rendering of the HTML on the copyright pop-up page. We'll need to add the same or a similar escaping strategy as what we added to homeSuccess and indexSuccess to ensure that HTML content still works on these pages when the Markdown functionality is turned on.
<?php echo render_value_html($sf_data->getRaw('content')) ?>
- Configure the copyright pop-up as per the documentation - remember to enable public access to the master DO!
- In Admin > Settings > Permissions, enable the Copyright pop up
- Add some HTML content to the editable area - a sample block included in the public demo site is included below - and save
- Press the preview button on the copyright pop-up
HTML content added to the copyright pop-up is escaped, and does not display styled.
HTML and inline CSS added to the copyright pop-up will display properly when the Markdown setting is enabled.
Copyright pop-up sample HTML
<div class="alert-danger" style="padding: 1px;"> <h1 style=" text-align: center;">Copyright Notice</h1> </div> <p>By copyright permission of the owner, this repository makes these digital object copies available to you for research, private study, or other purpose permitted under fair dealing as set out in the "Copyright Act":http://laws-lois.justice.gc.ca/eng/acts/C-42/Index.html. </p> <p>Use of the copies for any other purpose <strong>requires the authorization of the copyright owner(s).</strong> It is your responsibility to contact the copyright owner(s) to obtain permission.</p> <img class="img-circle" style="width: 80px; display: block; margin-left: auto; margin-right: auto;" align="middle" src="https://c1.staticflickr.com/4/3225/3020135683_41c68d66f7.jpg" />
#6 Updated by Dan Gillean 10 months ago
- Status changed from Verified to Feedback
- Assignee changed from Dan Gillean to Douglas Cerna
- Target version changed from Release 2.5.1 to Release 2.5.2
This has been reported not working in 2.5.1, and I've just confirmed locally. Looking at the PR, I think maybe this never got cherry-picked back to stable/2.5.x? Douglas can you check please?