Details
-
Bug
-
Resolution: Timed out
-
Low
-
1
-
Severity 3 - Minor
-
Description
Summary
Using REST API endpoints like this:
https://INSTANCENAME.atlassian.net/wiki/rest/api/content/1234567?expand=body.styled_view
Returns LESS code or other preprocessed CSS code instead of raw CSS.
Furthermore HTML ID's and Classes are not properly Wrapped into the DOM tree.
Environment
Confluence Cloud REST API
Steps to Reproduce
- Log into instance and perform a GET with a URL like this: https://INSTANCENAME.atlassian.net/wiki/rest/api/content/1234567?expand=body.styled_view (be sure to replace the 1234567 with an actual content ID.)
- Observe the returned body.
Expected Results
Body will be returned with working CSS code.
Actual Results
CSS portion of the code looks like this:
/* wiki-content.css */
/**
* AUI Overrides
* see /includes/css/aui-overrides.css
*/
.rounded-corners (@radius: 5px) {
-moz-border-radius: @radius;
-webkit-border-radius: @radius;
border-radius: @radius;
}
.wiki-content {
.header, .footer, .cell {
This contains nested CSS classes which are not a"vanilla" CSS feature.
Furthermore, you will see code like this:
.view .wiki-content .cell:first-child, .content-preview .wiki-content .cell:first-child { padding: 0; }
In the above example, the ".view" class was not in the HTML that was returned with the "body.styled_view" however this HTML class was returned in the plain "body.view" expand mode.
Notes
N/A
Workaround
Current workaround is to process the LESS code in your custom application, or to create your own CSS to style the "body.view" return data.
Attachments
Issue Links
- relates to
-
CONFCLOUD-69250 Converting content to styled_view using REST API returns invalid css
- Long Term Backlog