How do you use the CSS content property to add html entities?
I have a number of links which I make into a breadcrumb style list by adding an arrow before each.
<div class="breadcrumbs">
<a>One</a>
<a>Two</a>
<a>Three</a>
</div>
Which has the following style applied to it:
.breadcrumbs a:before {
content: '> ';
}
T...
Hi,
If I do a redirect in action as normal:
$this->redirect('@mypage?apple=1&banana=2&orange=3');
... Symfony produces the correct URL:
/something/something?apple=1&banana=2&orange=3
However, the following gets escaped for some bizarre reason:
$string = 'apple=1&banana=2&orange=3';
$this->redirect('@mypage?'.$string);
... and t...
Hi guys,
I'm having an issue with validating chinese characters against other chinese characters, for example I'm creating a simple password script which gets data from a database, and gets the user input through get.
The issue I'm having is for some reason, even though the characters look exactly the same when you echo them out, my if...
I'm parsing an xml file that stores image/caption data both of which I need to display on my canvas. However occasionally there's an entity in the file and when drawing the text to the canvas it interprets it as flat text. How can i get © to show up as on the canvas? Is this even possible, or does anyone know of a good work arou...
Hey,
I am writing a webapp in ZF and am having serious issues with UTF8. It's using multi lingual content through Zend Form and it seems that ZF heavily escapes all of these characters and basically just won't show a field if there's diacritical elements 'é' and if I use the HTML entity equivalent e.g. it gets escaped so that the user...
Hello,
I'm trying to decode encoded long dash from numeric entity to string, but it seems that I can't find a function which can do this properly.
The best that I found is mb_decode_numericentity(), however, for some reason it fails to decode long dash and some other special characters.
$str = '–';
$str = mb_decode_numericentit...
I am trying to scrape this page: http://www.udel.edu/dining/menus/russell.html. I have written a scraper in Ruby using the Hpricot library.
problem: HTML page is escaped and I need to display it unescaped
example: "M&M" should be "M&M"
example: "Entrée" should be "Vegetarian Entrée"
I have tried using the CGI library...
I want to create my own RSS/XML feed. I fetch data from the database to display, but keep getting invalid character errors. If the string has an ampersand or other strange characters in it, the XML will be invalid.
I tried using urlencode and htmlentities, but these don't capture all possible characters which need to be escaped. Does...
Hi all,
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'...
Hi all,
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 b...
I installed the new Like plugin on my Wordpress blog. I also have the Open Graph Plugin for Wordpress installed.
It all works magically except that the HTML special characters are showing on my Facebook Wall when I click like.
I tried preventing the Open Graph plugin from encoding the content of the mega tag in the first place by editi...
Is there a built in function in php to convert special characters to it's ascii code?
...
I want to convert this [email protected] to
hello@domain.com
I have tried:
url_encode($string)
this provides the same string I entered, returned with the @ symbol converted to %40
also tried:
htmlentities($string)
this provides the same string righ...
Hi-- I'm trying to parse a string from a French text, and I'm using both htmlspecialchars and html_entity_decode-- but certain characters aren't getting properly converted.
Any ideas?
Here's the code:
html_entity_decode(htmlspecialchars_decode($this->string($tstring))); // returned from web service
In particular, the entity that isn...
I have data that is coming in from a rss feed. I want to be safe and use htmlentities but then again if I use it if there is html code in there the page is full of code and content. I don't mind the formatting the rss offers and would be glad to use it as long as I can display it safely. I'm after the content of the feed but also want it...
EDIT: I solved it seconds after posting the question (sorry!) but can't accept an answer yet.
Hi folks,
Just a quick one. I have a PHP/CodeIgniter site and the user can edit their profile. I'm using CI's XSS Filtering and Active Record-based Models, so the data is escaped automatically.
It naturally displays fine on the profile page v...
Hi,
I have a string with special characters in Java.
"[^\\"]*\\"
I want to convert it to HTML entities like this:
"[^\\"]*\\"
How this could be achieved in Java?
...
I have a joomla isntallation which displays some articles normally but when i added an article with a youtube video, the WYSIWYG editor converted the special characters in the embed code to html entities.
Well, i'm assuming its the editor since it doesn't happen when i don't use it.
The problem after is that if i go to the article, i se...
I was reading an article about form security becuase I have a form which a user can add messages.
I read that it was best to use strip_tags(), htmlspecialchars() and nl2br()
Somewhere else said to use html_entity_decode()
I have this code in my page which takes the user input
<?php
$topicmessage = check_input($_POST['message']);...
$perl -e 'use HTML::Entities; print encode_entities("<te£st>");'
<te£st>
I'm expecting to see:
<te£st>
...