我正在使用DynamoDB来存储前端表单中的数据,我的数据对象如下所示 .
{
"data": {
"id": "uuid1",
"content": "<h1>Title</h1><p>This is content</p>"
}
}
我不确定 <h1>Title</h1><p>This is content</p>
是用HTML标签保存字符串的最佳方法 .
将 <h1>Title</h1><p>This is content</p>
保存到DynamoDB并在前端显示并正确呈现HTML标记的最佳方法是什么?
1 回答
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html
字符串
由于您的所有标签都兼容UTF-8,因此您无需进行任何特殊编码 .