dbt-labs / dbt-core

dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.
https://getdbt.com
Apache License 2.0
9.63k stars 1.6k forks source link

[CT-1780] [Regression] Documentation formatting #6559

Closed OnFormLimited closed 1 year ago

OnFormLimited commented 1 year ago

Is this a regression in a recent version of dbt-core?

Current Behavior

I noticed that in updating DBT from 0.x to 1.x documentation markup seems to no longer support certain elements for colour (i.e. span style="color:darkslateblue"> Overview )

Expected/Previous Behavior

Code such as span style="color:darkslateblue"> Overview expected to render the text element in the specified colour

Steps To Reproduce

  1. In Develop - click View Docs
  2. Opening page will show elements like Data Warehouse Documentation - instead of the actual text in the specified colour

Relevant log output

No response

Environment

DBT Cloud

- OS: Windows 10
- dbt (working version): 1.2
- dbt (regression version): 0.nnn

Which database adapter are you using with dbt?

No response

Additional Context

No response

dbeatty10 commented 1 year ago

Thanks for reaching out @OnFormLimited !

It sounds like you are using dbt Cloud? If so, the best way to reach out to us is by using the speech bubble (💬) in the dbt Cloud interface or at support@getdbt.com

OnFormLimited commented 1 year ago

Thanks lots, will do

jtcohen6 commented 1 year ago

This is related to some security changes we made a while ago, in v1.0.x, which sanitize Markdown (and thereby disallow a lot of arbitrary HTML/JS): https://github.com/dbt-labs/dbt-docs/pull/227

Thanks for reaching out to dbt Cloud so they can take a deeper look!

github-actions[bot] commented 1 year ago

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.

github-actions[bot] commented 1 year ago

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.

fernandobrito commented 10 months ago

Fun story: we have an internal automation that appends extra "data quality" metrics at the bottom of each model description, formatted as Markdown + HTML tags to color some of the numbers. Every time we upgrade dbt we do a "search and replace" from sanitize:!0 to sanitize:0 in our index.html so we can render our pretty formatting correctly.

image

Ok, technically we have a pre-generated index_customized.html in another folder and we overwrite the index.html with it during our publishing pipeline (we self-host our docs). On every upgrade, we take a newly generated index.html, copy to index_customized.html, and make our changes again.

I understand and agree that it makes sense to sanitize it, so I'm not re-opening the ticket or expecting any action on it. I'm just sharing it here in case other people also want to take the risk and disable the sanitization themselves. 😄