I giving a support for my friend website. In that site they use Regex pattern for filter tags and HTML special characters. Case of that quote and others symbols are missing when it comes as a special character (ex:- &rsquo &lsquo).
So do we need to remove HTML special character from og:description property field ?
Related
i have this link with the url /laws/document?ref=S-AL1_2_36458.
when clicking on it, weird characters are being added. the characters are:
%E2%80%8B%E2%80%8B%E2%80%8B%E2%80%8B%E2%80%8B
so the url will end being:
/laws/document?ref=S-AL1_2_36458%E2%80%8B%E2%80%8B%E2%80%8B%E2%80%8B%E2%80%8B
when encoding the original link in js (using encodeURI()) it returns the same weird link. however, when encoding just the "ref value"
which is S-AL1_2_3645 it doesn't add weird chars
%E2%80%8B is URL encoded sequence for the Unicode character ZERO WIDTH SPACE (U+200B). This appears repeated 5 times in your URL.
So it seems, that the link isn’t actually just /laws/document?ref=S-AL1_2_36458 but it is /laws/document?ref=S-AL1_2_36458<ZWSP><ZWSP><ZWSP><ZWSP><ZWSP> which the browser will then encode properly in order to make the request. This behavior is expected and correct if that’s the actual URL that is being navigated to.
If this is not the URL that you want, I would suggest you to check the HTML of the link. If this is a static HTML, then check if there are any characters at the end of the URL and remove them. Since they are spaces of zero-width, they are effectively invisible but there are still there (e.g. in text editors, you will notice them when moving your cursor). If this is a generated link, check where the value comes from and try to trim any whitespace around the source.
I removed this special character using string locator but still live on my site.
http://prntscr.com/ke7pby
It's just before my footer are.
Please refer to this answer :
Just use notepad ++ with encoding UTF-8 without BOM.
In my asp.net website I have a HTML page which contains some words with Superscript, for example the HTML representation is as below...
ABC<sup>def</sup>
when it is rendered in browser it appears like this : ABCdef
I have a export feature which export the HTML document to a word document. When I am exporting it is being exported as ABC<sup>def</sup> in the worddoc.
I have been trying to do it using some kind of regex html = html.Replace("<sup>", "\"");
but that doesn't help.
Can anybody please help me how would I make it appear as ABCdef in my word document too using asp.net?
This is an older question but I've been trying to do the same thing in reverse. The problem is with how Word formats and defines its super and subscripts.
There are no tags that Word used to define super and subscripts, it uses relative positioning and font-size declarations to generate symbols that look like super and subscripts.
Unfortunately there is no reliable regex to turn Word's positioning into super/subscripts, and there is no way to regex a document with those tags to make Word recognize them.
Currently I am working with word press plugin development , I have form contains some German special characters , but it does showing properly in the webpage
For eg : - when I put ä German letter , the page displaying � type things.
how it comes ??
I have tried <meta charset="UTF-8">, but it doesn't change anything and also tried
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', 'utf8_general_ci');
But it' does change anything, still getting � type of character , anyone please help thank in advance ....
Some German special character you can't directly write that.
Please use ä for for ä
For more details Refer the links
http://webdesign.about.com/od/localization/l/blhtmlcodes-de.htm#codes
I have an article that has smart quotes in it, so I need to escape the article content. However, if I use
article.body| e
to escape the article, the html does not show up as formatted. And if I use
article.body| raw
the article is displayed correctly as html but the smart quotes are not escaped in the content.
Does anyone know how to escape content while correctly displaying the html?
You can specify a strategy for the escape filter.
'html' won't work for you here because it internally uses PHP's htmlspecialchars
'html' is the default strategy when using {{ var|e }}
You will need to create a custom escaping strategy for your use case.
... but if it's only the quotes which need to be replaced you could do a simple preg_replace on PrePersist and PreUpdate using Doctrine's Lifecyle Events.
to show the special characters we can use like this {{ '<'|e }} it will print only angle angle bracket '<'