diff --git a/ElementX/Sources/Other/HTMLParsing/AttributedStringBuilderV1.swift b/ElementX/Sources/Other/HTMLParsing/AttributedStringBuilderV1.swift
index 4d194e80b..b6b6dcf92 100644
--- a/ElementX/Sources/Other/HTMLParsing/AttributedStringBuilderV1.swift
+++ b/ElementX/Sources/Other/HTMLParsing/AttributedStringBuilderV1.swift
@@ -104,7 +104,7 @@ struct AttributedStringBuilderV1: AttributedStringBuilderProtocol {
removeDTCoreTextArtifacts(mutableAttributedString)
let result = try? AttributedString(mutableAttributedString, including: \.elementX)
- Self.cacheValue(result, forKey: htmlString, cacheKey: cacheKey)
+ Self.cacheValue(result, forKey: originalHTMLString, cacheKey: cacheKey)
return result
}
diff --git a/ElementX/Sources/Other/HTMLParsing/AttributedStringBuilderV2.swift b/ElementX/Sources/Other/HTMLParsing/AttributedStringBuilderV2.swift
index f162e8ce1..71d7d4076 100644
--- a/ElementX/Sources/Other/HTMLParsing/AttributedStringBuilderV2.swift
+++ b/ElementX/Sources/Other/HTMLParsing/AttributedStringBuilderV2.swift
@@ -78,7 +78,7 @@ struct AttributedStringBuilderV2: AttributedStringBuilderProtocol {
addMatrixEntityPermalinkAttributesTo(mutableAttributedString)
let result = try? AttributedString(mutableAttributedString, including: \.elementX)
- Self.cacheValue(result, forKey: htmlString, cacheKey: cacheKey)
+ Self.cacheValue(result, forKey: originalHTMLString, cacheKey: cacheKey)
return result
}