Remove html markup from Rally description field

牧云@^-^@ 提交于 2020-01-05 18:38:02

问题


Is there a quick way to remove html markup from a string ? The problem is I am copying the description from stories to the clipboard, we just want plain text but of course the value of description will be marked up. So I want to turn ...

<SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">text text text</SPAN>

into

text text text

回答1:


If you are using ExtJS (or Rally App SDK 2.x):

Ext.util.Format.stripTags(...);

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.util.Format-method-stripTags https://rally1.rallydev.com/apps/2.0p/doc/#!/api/Ext.util.Format-method-stripTags



来源:https://stackoverflow.com/questions/10442084/remove-html-markup-from-rally-description-field

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!