Rud*_*udi 10 .net html c# string html-encode
我将一些数据从另一个测试/错误跟踪工具导入到tfs中,我想转换它的描述,它是简单的HTML,所以是一个普通的字符串,其中保留了HTML的"布局".
例如:
<body>
<ol>
<li>Log on with user Acme & Co.</li>
<li>Navigate to the details tab</li>
<li>Check the official name</li>
</ol>
<br>
<br>
Expected Result:<br>
official name is filled in<br>
<br>
Actual Result:<br>
The &-sign is not shown correctly<br>
See attachement.
</body>
Run Code Online (Sandbox Code Playgroud)
将插入换行符并将HTML实体翻译成纯文本:
1. Log on with user Acme & Co. 2. Navigate to the details tab 3. Check the official name Expected Result: official name is filled in Actual Result: The &-sign is not shown correctly See attachment
我现在可以使用正则表达式替换一些带有换行符的标签并删除其余部分,但是替换HTML实体和类似的东西<ol>,<ul>似乎我正在重新发明一些东西(浏览器?).所以我想知道是否有人在我面前这样做了.我用谷歌找不到它.
| 归档时间: |
|
| 查看次数: |
3989 次 |
| 最近记录: |