speced / respec

A tool for creating technical documents and web standards
https://respec.org/
Other
713 stars 385 forks source link

using class="issue" will include githubusercontents URL #3825

Open himorin opened 2 years ago

himorin commented 2 years ago

Important info

Description of problem

we have a github issue with image attached and included in the initial comment, and we wanted to include it by using class="issue" feature of respec. output from github API contains a img with source URL using githubusercontent, and that line causes an error on W3C publication.

it should be hard to fix that url and place contents locally during processing, so I'd request this to be documented...

marcoscaceres commented 2 years ago

that line causes an error on W3C publication.

@himorin, can you clarify a bit more what the problem is?

It is because it's not on a w3c server?

himorin commented 2 years ago

Yes, new pubrules with Process 2021 requires all sub-resources are under /TR/, including images and CSS files. So, if one includes image in an initial comment of included issue(s), this function will just include provided HTML from github (as it is shown in github web page), which results as an error.

marcoscaceres commented 2 years ago

Hmmm... that seems a bit unfortunate. @deniak, @plehegar, please see above. I wonder if PubRules is being overly restrictive here, as having issues with images is a fairly valid use case? Maybe we can be a bit more liberal for WDs and allow "githubusercontent"?

sidvishnoi commented 2 years ago

FWIW, if deployment to TR is done via spec-prod GitHub action, it automatically downloads images from GitHub issues. (https://github.com/w3c/spec-prod/pull/46)

himorin commented 2 years ago

Even with streamline publication using spec-prod, we need to edit by hand for FPWD or CR*. (so documentation is desired...)

deniak commented 2 years ago

The problem is we don't have control over githubusercontent.com and we cannot ensure the images will always be there. It might not be such an issue for WDs but I understand it can also affect CR, PR and REC which is more problematic this is more problematic.

plehegar commented 2 years ago

@deniak is correct. In fact, the new Process 2021 reemphasizes the need to ensure that W3C maintains long term control over its content, going way beyond the scope of /TR. So, more than ever, it's not ok to publish in /TR with content which is outside of the control of W3C, even if the content is not normative.

marcoscaceres commented 2 years ago

Makes sense, thanks @plehegar ... I'll write something to check that images are either same origin (for development) or /TR/ and show a warning.