html-entities

Multibyte characters in URL are not rendering

不想你离开。 提交于 2020-01-07 06:44:13
问题 I have a bugging problem. For a website I made there are search engine friendly URL's generated. The only problem is there are ß-chars in the url too. Chars like ö, ï, ä, ü etc. are placed correct. But with the ß-char there is a diamond-icon with a questionmark in it. -> � I thought it had to do with the charset which is used but i've tried both UTF-8 and iso-8859-1. Both without luck. I need to have the correct character in the url for the readability of deeplinks. 回答1: does the character U

How can I preserve HTML entities with Diazo?

人走茶凉 提交于 2020-01-06 06:49:07
问题 I have the following simple Diazo rules file: <rules xmlns="http://namespaces.plone.org/diazo" xmlns:css="http://namespaces.plone.org/diazo/css" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <theme href="theme/theme.html" /> <replace css:theme-children="#content" css:content-children=".content" /> </rules> and theme: <html> <body> <div id="content"> Lorem ipsum ... </div> </body> </html> The source I want to transform is: <html> <body> <div class="content"> <a href="mailto:info@example

Laravel e function (htmlentities) is not fully working, scripts can still be executed (only once)

假装没事ソ 提交于 2020-01-05 08:06:30
问题 I am trying to use the e function in Laravel which is equivalent to the htmlentities PHP function. In my Form view and Controller I am trying to save a document that uses the e function which looks like this: Form view: {{ Form::text('client_name') }} Controller: $client = new Client; $client->client_name = e(Input::get('client_name')); $client->save(); Say I wrote <script type="text/javascript">alert('gotcha!');</script> into the client_name field. I then save it to database but when it

Converting special characters with htmlspecialchars and htmlentities

笑着哭i 提交于 2020-01-04 05:38:26
问题 I am getting confused with injecting special characters into my database now... For instance, I want to accept characters like this ö , ù , etc and I want to display them as they are on html such as Löic which is a French name. And I thought I must convert these special characters into html entities before injecting them into database, like ö for ö . If I use htmlspecialchars() to convert them, Array ( [name] => Löic ) if(isset($_POST['name'])) $name = preg_replace('/\s\s+/', ' ', trim($_POST

How to decode html entities in JasperReports

﹥>﹥吖頭↗ 提交于 2020-01-04 02:05:12
问题 I have some reports written in JasperReports and they display html entities literally, for example, bullet point • is shown using html entity textual representation: #8226;. Do you know any way around it? 回答1: In the textField set the markup attribute as html . 回答2: If you are using iReport for designing the reports, checkout "markup" property in the properties window, for that particular field. 回答3: As the reports are XML layouts, they can be converted to UTF-8 easily as 8226 is the Unicode

How to add a copyright symbol in reason-react component?

喜夏-厌秋 提交于 2020-01-03 16:45:01
问题 I’m new to reason-react. I’m trying to put a copyright symbol in a react-reason component. I've tried <span >(ReasonReact.stringToElement("©"))</span> but this doesn’t give me the © symbol. 回答1: It's also possible, and usually simpler, to just use the unicode character: let copy = ReasonReact.stringToElement({js|\u00a9|js}); // Since ReasonReact 0.7.0 you can use let copy = React.string({js|\u00a9|js}); Or even shorter: let copy = [%raw {|'\u00a9'|}]; It's also possible to use unicode

jquery html() is decoding html entities by default?

笑着哭i 提交于 2020-01-02 07:53:13
问题 I dont know why on earth jquery html() is doing this, but after i do $('html').html() i get "&copy" automatically converted to © anyway to avoid this? I need to dump the html of the page using javascript and dont need this useless conversions that are screwing up the html. 回答1: This really isn't the jQuery, or even JavaScript for that matter. The browser will hold its own normalised representation of the underlying DOM. It will bear a close resemblence the the document itself, but character

SWIFT: +[CATransaction synchronize] called within transaction while decoding HTML entities

人走茶凉 提交于 2020-01-02 07:15:15
问题 I am making an app that fetches JSON content of a blog. The titles of the blog articles are shown in tableView. The titles fetched were HTML encoded. So I decoded them using this code func configureCell(cell: UITableViewCell, atIndexPath indexPath: NSIndexPath) { let object = self.fetchedResultsController.objectAtIndexPath(indexPath) as NSManagedObject var encodedString = object.valueForKey("title")!.description var encodedData = (encodedString as NSString).dataUsingEncoding

XML Parsing Error: undefined entity - special characters

前提是你 提交于 2020-01-02 02:48:05
问题 Why does XML display error on certain special characters and some are ok? For instance, below will create error, <?xml version="1.0" standalone="yes"?> <Customers> <Customer> <Name>Löic</Name> </Customer> </Customers> but this is ok, <?xml version="1.0" standalone="yes"?> <Customers> <Customer> <Name>&</Name> </Customer> </Customers> I convert the special character through php - htmlentities('Löic',ENT_QUOTES) by the way. How can I get around this? Thanks. EDIT: I found that it works fine if

ASCII to HTML-Entities Escaping in Java

我是研究僧i 提交于 2020-01-01 15:10:35
问题 I found this website with escape codes and I'm just wondering if someone has done this already so I don't have to spend couple of hours building this logic: StringBuffer sb = new StringBuffer(); int n = s.length(); for (int i = 0; i < n; i++) { char c = s.charAt(i); switch (c) { case '\u25CF': sb.append("●"); break; case '\u25BA': sb.append("►"); break; /* ... the rest of the hex chars literals to HTML entities */ default: sb.append(c); break; } } 回答1: These "codes" is a mere decimal