diff --git a/ElementX/Sources/Other/HTMLParsing/AttributedStringBuilderV2.swift b/ElementX/Sources/Other/HTMLParsing/AttributedStringBuilderV2.swift
index 6277b932c..8c70bc027 100644
--- a/ElementX/Sources/Other/HTMLParsing/AttributedStringBuilderV2.swift
+++ b/ElementX/Sources/Other/HTMLParsing/AttributedStringBuilderV2.swift
@@ -182,7 +182,7 @@ struct AttributedStringBuilderV2: AttributedStringBuilderProtocol {
}
case "span":
- if (try? childElement.attr(Self.attributeMSC4286)) ?? nil != nil {
+ if childElement.dataset()[Self.attributeMSC4286] != nil {
content = attributedString(from: childElement, preserveFormatting: preserveFormatting, listTag: listTag, listIndex: &childIndex, indentLevel: indentLevel)
}