簡體   English   中英

PreMailer“找不到方法”(AngleSharp.Dom.IElement.RemoveAttribute)

[英]PreMailer “Method Not Found” (AngleSharp.Dom.IElement.RemoveAttribute)

我有這個使用PreMailer內聯CSS的代碼;

PreMailer.Net.PreMailer cleanser = new PreMailer.Net.PreMailer(htmlString);
PreMailer.Net.InlineResult result = cleanser.MoveCssInline(ignoreElements: ".ignore");
return result.Html

但我得到了這個例外:

找不到方法:'Void AngleSharp.Dom.IElement.RemoveAttribute(System.String)'

堆棧跟蹤

[MissingMethodException: Method not found: 'Void AngleSharp.Dom.IElement.RemoveAttribute(System.String)'.]
PreMailer.Net.StyleClassApplier.ApplyStyles(IElement domElement, StyleClass clazz) +0
PreMailer.Net.StyleClassApplier.ApplyAllStyles(Dictionary`2 elementDictionary) +125
PreMailer.Net.PreMailer.MoveCssInline(Boolean removeStyleElements, String ignoreElements, String css, Boolean stripIdAndClassAttributes, Boolean removeComments) +241

答案可能很明顯,但我只是沒有點擊。

AngleSharp:v0.9.9

PreMailer:v1.5.4

已經為PreMailer發布了更新。 升級到1.5.5以解決此問題! 無需回滾AngleSharp!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM