- Allow data attributes in spans (#364)
- Update dependencies
- Remove embed functionality (#358)
- Rename embed-related code to
content block
- Do not attempt to parse embed codes if
content_blocks
option is missing
- Support embeds in Govspeak
- Do not pin version of govuk_publishing_components
- Drop support for Ruby 3.0. The minimum required Ruby version is now 3.1.4.
- Add support for Ruby 3.3.
- Allow acronyms within example blocks.
- Allow tables within example blocks.
- Allow acronyms within address blocks.
- Fix tables within call to action component (#306)
- Fix single line formatting of call to action component (#302)
- Various bug fixes related to legislative list components (#298)
- Bug fixes related to block elements in call to action and legislative list components (#293)
- Various bug fixes related to abbreviations in call to action and legislative list components (#291)
- Prevent user error when incorrectly formatted footnotes are added to HTML attachments (#287)
- Reintroduce support for acronyms in Call To Action blocks and in Legislative Lists (#285)
- Allow attachment links wtihin numbered lists (#283)
- Add margin-bottom to embedded attachments (#281)
- BREAKING: HTML style attribute and style element, which were never supposed to be available, are forbidden. #279
- Make image and attachment embedding syntax more consistent #274
- Fix for abbreviations nested in button. #267
- Govspeak was stripping superscript from markdown when it shouldn't have. #264
- BREAKING CHANGE Remove
PriorityList
, thePrimaryList
JS module to render the priority list on the frontend is to be removed #249
- Fix bug where inconsistent linebreaks trigger validations #250
- Require Kramdown minimum version of 2.3.1 to avoid CVE-2021-28834 #246
- Fix footnote numbering #239
- Fix a bug which resulted in validation errors on 'Start Button' elements #237
- Drop support for Ruby 2.6 which reaches End of Life (EOL) on 31/03/2022
- Add support for Rails 7 by loosening the version constraint on
activeview
gem - Fix deprecation notices caused by the bump in Ruby version
- Fixes bug which reverts acronyms from being converted into abbr tags #229
- Fix broken HTML in CTA extension. #226
- Add draggable false to button markup and validation #224
- Fix footnotes in call-to-action boxes 222
- Remove Nokogumbo dependency to resolve warning 220
- Fix regex for footnotes in legislative lists 218
- Update heading & docs #206
- Allow passed elements to be relaxed from sanitization #203
- Fix issue rendering $CTA blocks before $C (PR#202)
- Be optimistic in versions of govuk_publishing_components and i18n allowed (PR#200)
- Adjust footnote markup to accommodate multiple references (PR#198)
- Customise footnote markup for accessibility (PR#192)
- Update GOV.UK Publishing components to version to 23.0.0 or greater
- Update Kramdown version to 2.3.0 or greater
- Prevent links in table headers being stripped (PR#187)
- Require Sanitize to be at least 5.2.1 due to https://nvd.nist.gov/vuln/detail/CVE-2020-4054
- Use button component for buttons (PR#176)
- Allow
data
attributes ondiv
tags (PR#173)
- Change unicode testing characters after external gem change
- Move from govuk-lint to rubocop-govuk
- Allow version 6 of actionview
- Allow data attributes on links
- Add table heading syntax that allows a table cell outside of
thead
to be marked as a table heading with a scope of row. (PR#161)
- Unicode characters forbidden in HTML are stripped from input
- Validation is now more lenient for HTML input
- Update warning callout label text from 'Help' to 'Warning'
- Remove experimental status on
AttachementLink:attachment-id
andAttachement:attachment-id
- Deprecate
embed:attachments:inline:content-id
- Fix wrapping
AttachmentLink:attachment-id
in a paragraph when used inline
- Remove
[embed:attachments:content-id]
this isn't used by any apps and has never worked - Add dependency on govuk_publishing_components
- Add new
AttachementLink:attachment-id
extension and mark as experimental - Add new
Attachement:attachment-id
extension and mark as experimental - Blockquote quote remover is now more forgiving to spaces before or after quote characters
- BREAKING CHANGE: Input is sanitized by default, to use unsafe HTML initialize with a sanitize option of false
- Allow sanitize option on remove invalid HTML from source input
- BREAKING CHANGE: Remove
to_sanitized_html
method in favour ofsanitize
option on initialize - BREAKING CHANGE: Remove
to_sanitized_html_without_images
as no apps use this anymore - BREAKING CHANGE: Remove CLI usage
- Don't render
[Image: {file-name}]
within a paragraph to avoid invalid HTML
- Add image credits to embedded images
- Add new
Image:image-id
extension and deprecateembed:attachments:image:content-id
- Include locale, config and asset files in the gem distribution
- Update ActionView to 5.x
- Fix translation files not loading when gem is used in an app
- Change the data inputted into Contacts to match contacts schema #130
- Update sanitize version to 4.6.x #127
- Ignore links with blank or missing
href
s when extracting links from a document withGovspeak::Document#extracted_links
#124
- Add an optional
website_root
argument toGovspeak::Document#extracted_links
in order to get all links as fully qualified URLs #122
- Add a link extraction class for finding links in documents #120
- Fix rendering buttons with inconsistent linebreaks seen in publishing #118
- Fix validation to make sure buttons are considered valid
- Only allow buttons to be used on new lines, not when indented or inline within text (useful for guides) #116
- Add button component for govspeak #114 see README for usage
- Update Kramdown version to 1.15.0
- Fix matching links/attachments/contacts by regex to use equality #105
- Loosen ActionView dependency to allow use with Rails 5 #99
- Move presenters into the Govspeak namespace #93
- Embedded links now will automatically be marked with
rel="external"
#96
- Update Kramdown version to 1.12.0
- Add pry-byebug to development dependencies
- Ability to run Govspeak as a binary from command line #87
- Uses hashes the primary interface for options to commands #89
- Adds the
[embed:attachments:image:%content_id%]
extension #90 - Renders incorrect usages of embedding content as empty strings rather than outputting markdown 91
- Drop support for Ruby 1.9.3
- Update Ruby to 2.3.1
- Adds support for the following items for feature parity with whitehall:
{barchart}
[embed:attachments:%content_id%]
[embed:attachments:inline:%content_id%]
[embed:link:%content_id%]
[Contact:%content_id%]
- Changes blockquote rendering to match whitehall #81
- Update Addressable version from 2.3.8 to 2.4.0
- Fix bug with link parsing introduced in Kramdown 1.6.0 with the "inline attribute lists" feature which clashed with our monkey patch #75
- Update minimum Kramdown version from 1.5.0 to 1.10.0 (changelog)
- Allow table columns to be left, right or centre aligned using the standard markdown pattern provided by Kramdown
- Yanked, see 3.6.1 which includes fix
- Fix a couple of issues with the header_extractor. The method now picks up headers nested inside
blocks
, and when ID's are explicitly set. See #66 for more.
- Continue to support non-strict URIs in links on Ruby 2.2.x. See #57
- Add
{stat-headline}*10m* big numbers{/stat-headline}
markdown for HTML publications aside
elements are now allowed through the sanitization process.- Update Ruby from 1.9.3 to 2.1
- Increase the version of Kramdown to
1.5.0
. This allows compatibility with Jekyll and the GitHub pages gem.
- Relax Nokogiri dependency to
1.5.x
rather than1.5.10
. This allows Govspeak to work with Rails 4.2 and greater.
span
elements are now allowed through the sanitization process.
- Fix a bug where address information could get mixed in with preceding paragraph text.
- Allow a call to
#valid?
on aGovspeak::Document
to accept validation options.
- Add an
allowed_image_hosts
options toHtmlValidator
(andHtmlSanitizer
) - BREAKING CHANGE: Added the
$EndLegislativeList
tag which allows line breaks inLegislativeLists
.
- Fix a bug with the HtmlValidator to do with kramdown now respecting character encodings of input data.
- Upgrade to newest kramdown, which fixes a number of bugs, including rendering multiple footnote references and handling underscores in attachment titles
- Upgrade sanitize dependency to 2.1.0
- Now allows
address
,bdi
,hr
andsummary
elements by default. - Allows colons in IDs
- BREAKING CHANGE: This changes the validation rules of HtmlSanitizer.
- Now allows
- Stop duplicate entries in the sanitization config
- Fix a bug with parsing of
$LegislativeList
and$PriorityList
with\r\n
line endings.
- Fix a bug with parsing of
$LegislativeList
and$PriorityList
so that they are not matched when immediately preceeded by other text.
- Add
$LegislativeList
to allow editors to insert lists with custom markers.
- Stop steps list regex matching newline.
- Nested Govspeak blocks are now parsed recursively using Govspeak. Among other things, this fixes the display of external links in callout blocks.
- Fixed over-eager step list matching.
- Fixed newline matching and operating over multiple list blocks.
- Added
$PriorityList:x
construct to class the firstx
list items withprimary-item
. - Fixed
rcov
dependency.
- Added
#structured_headers
method to provide heirarchically structured headers extracted from markdown text heading tags.