我正在使用C#API创建产品。到目前为止,它仍然有效,但是我的问题是,描述中的一些HTML标记已被剥离。
例如,在下面的代码中,iframe
标记已删除。我们的某些产品带有视频,我希望将其包含在产品说明中。标题和段落标签等其他标签也可以使用。
return new Product {
// ...
description = GetDescription(product),
// ...
};
public static string GetDescription(DBProduct product)
{
var description = product.description;
foreach(var video in product.videos)
{
description = $"<iframe width=\"1536\" height=\"760\" src=\"{video.url}\" allowfullscreen></iframe>" + description;
}
return description;
}
我可以通过API创建包含其他HTML标签的产品吗?谢谢。