Port #125 (preserve XML-fragment markup) to v2/lutaml-integration#127
Merged
Conversation
Port of fd20c9d (#125) to the v2/lutaml-integration branch. Switch Bibcollection.from_xml to read the collection title and author via inner_html instead of Nokogiri's .text, so the in-memory strings keep their XML-fragment form (markup + entities intact). Apply the strip_html Liquid filter on the HTML <title> tag position so the browser tab title stays plain text. Adds find_html to ElementFinder alongside find_text. Adds a regression spec with markup and & in both the collection title and the author name. Refs metanorma/isodoc#785. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
opoudjis
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lutaml-integrationbranch.Bibcollection.from_xmlto read collection title and author viainner_html(newElementFinder#find_html) so XML-fragment markup and entities survive into the in-memory model.| strip_htmlon the<head><title>tag position in_index.liquidso the browser tab title stays plain text while the coverpage title keeps its inline markup.Skipped vs the original commit (intentional on v2):
relaton-cli.gemspec: original bumpedrelatonto~> 1.20.3; v2 is on~> 2.1.0and stays there..github/workflows/rake.yml:workflow_dispatch:is already present on this branch.Refs metanorma/isodoc#785.
Test plan
bundle exec rspec spec/relaton/cli/xml_to_html_renderer_spec.rb— 8 examples, 0 failures, including the newindex-with-markup.xmlregression context.bundle exec rspecon CI.🤖 Generated with Claude Code