html-encode

Setting parts of a String to Bold in UIView

前提是你 提交于 2019-12-08 10:47:18
问题 I'm parsing an XML file an get a string as NSMutableString . Now I want to show this string as text in my UIView . So, I created a TextView and set its value to my string. The result was that I have the text with HTML Tags shown up in the TextView. There is no problem removing the tags from the string, but some of the text needs to appear as bold. Is there any way to display parts of a string as bold programmatically? I replaced <br> Elements with \n and it works fine for line-break. But I

Is there a functionality like Sublime's “HTML: Encode Special Characters” in Intellij IDEA

耗尽温柔 提交于 2019-12-07 00:53:20
问题 I'm looking something like the functionality given in Sublime Text by the shortcut (windows) Ctrl + Shift + P named "HTML: Encode Special Characters" but in IntelliJ IDEA . This functionality is able to transform this (as a example): I'm a special character phrase "áéíóú ñ" Into this: I'm a special character phrase "áéíóú ñ" Only by surrounding the specified text and pressing the shortcut key combination given above (again, in windows Ctrl + Shift + P ). Any thoughts? UPDATE (07-04-2016) By

HtmlEncode on Post for ASP.Net MVC 3 Html.TextAreaFor

放肆的年华 提交于 2019-12-06 19:45:43
问题 I have an ASP.Net MVC 3 page in which I have an Html.TextAreaFor control, see code below. If I try to submit the page to the http post action with text in angle brackets like: <test> , I get a yellow error screen saying: A potentially dangerous Request.Form value was detected from the client (RequestText=""). I don't understand why I am getting this because I found an article by Scott Guthrie that says the new <%: %> syntax in .Net 4, will automatically HtmlEncode the element. Since I'm using

How and when to use Html encode

让人想犯罪 __ 提交于 2019-12-06 07:29:54
问题 I've recently learned that i shouldn't store html encoded data in the database, but i should rather html encode the data that is shown on the screen for the user. No big deal, i have to fix my database records and make some code changes. But my question is, when should I use html encode and when shouldn't I. For example, within a html table, I'm writing directly from the database to the inner HTML of a column. Without encoding this would be dangerous, I get that. What about when setting the

html_entity_decode in FPDF(using tFPDF extension)

扶醉桌前 提交于 2019-12-06 04:02:51
问题 I am using tFPDF to generate a PDF. The php file is UTF-8 encoded. I want © for example, to be output in the pdf as the copyright symbol. I have tried iconv , html_entity_decode , htmlspecialchars_decode . When I take the string I am trying to decode and hard-code it in to a different file and decode it, it works as expected. So for some reason it is not being output in the PDF. I have tried output buffering. I am using DejaVuSansCondensed.ttf (true type fonts). Link to tFPDF: http://fpdf.org

Microsoft AntiXSS - Is there a need to Decode?

喜欢而已 提交于 2019-12-06 02:31:29
The HttpUtility class provides for both encoding and decoding. But, when I use the MS AntiXSS 3.1 Library I have a set of methods only for encoding, does this mean decoding can be avoided? For example Before applying AntiXSS: lblName.Text = "ABC" + "<script> alert('Inject'); </script"; After applying AntiXSS: lblName.Text = AntiXSS.HTMLEncode("ABC" + "<script> alert('Inject'); </script"); So, after applying the encoding, the HTML tags show up in my Label control. Is this the desired outcome? Yes, I think this is desired output. This is because the script is not executed. If the script would

Can R read html-encoded emoji characters?

半腔热情 提交于 2019-12-05 07:32:27
Question My question, explained below, is how can R be used to read a string that includes HTML emoji codes like &#55358;&#56599; , and either (1) represent the emoji symbol (e.g., as a unicode symbol: 🤗 ) in the parsed string, or (2) convert it into its text equivalent (" :hugging face: ")? Background I have an XML dataset of text messages (from the Android/iOS app [Signal])( https://signal.org/ ) that I am reading into R for a text mining project. The data look like this, with each text message represented in an sms node: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!-- File

Is there a functionality like Sublime's “HTML: Encode Special Characters” in Intellij IDEA

折月煮酒 提交于 2019-12-05 05:15:19
I'm looking something like the functionality given in Sublime Text by the shortcut (windows) Ctrl + Shift + P named "HTML: Encode Special Characters" but in IntelliJ IDEA . This functionality is able to transform this (as a example): I'm a special character phrase "áéíóú ñ" Into this: I'm a special character phrase "áéíóú ñ" Only by surrounding the specified text and pressing the shortcut key combination given above (again, in windows Ctrl + Shift + P ). Any thoughts? UPDATE (07-04-2016) By now, Intellij Idea support this feature natively (version 2016). You need to select the text you want to

Make an NSURL with an encoded plus (%2B)

妖精的绣舞 提交于 2019-12-04 18:09:46
问题 I need to pass a timestamp with a timezone offset in a GET request, e.g., 2009-05-04T11:22:00+01:00 This looks like a two arguments "2009-05-04T11:22:00" and "01:00" to the receiving PHP script (over which I've no control). NSURL doesn't encode plus signs, but if I make an NSURL using the string 2009-05-04T11:22:00%2B01:00 the url I end up with contains: 2009-05-04T11:22:00%252B01:00 Any ideas how I can preserve my encoded plus sign or just plain prevent NSURL from encoding anything? 回答1:

How and when to use Html encode

谁都会走 提交于 2019-12-04 12:43:22
I've recently learned that i shouldn't store html encoded data in the database, but i should rather html encode the data that is shown on the screen for the user. No big deal, i have to fix my database records and make some code changes. But my question is, when should I use html encode and when shouldn't I. For example, within a html table, I'm writing directly from the database to the inner HTML of a column. Without encoding this would be dangerous, I get that. What about when setting the value of a textbox. It seems to work without having to html encode the value. But I'm not sure why. This