Questions tagged [htmldecode]

21 questions
6
votes
2 answers

Convert � � to Emoji in HTML using PHP

We have a bunch of surrogate pair (or 2-byte utf8?) characters such as �� which is the prayer hands emojis stored as UTF8 as 2 characters. When rendered in a browser this string renders as two ?? example: I need to convert those to…
Tyler F
  • 101
  • 1
  • 7
4
votes
2 answers

Decode HTML 5 Character set

I am unable to decode the following HTMl 5 code 10:00 AM in my c# code, after using HttpUtility.HtmlDecode("10:00 AM"); i get the same Output instead of seried output "10:00 AM". However when i use other HTML character sets like & or…
Rolwin Crasta
  • 4,219
  • 3
  • 35
  • 45
1
vote
1 answer

Angular 7 - Encoding and Decoding HTML Entities In [(ngModel)]

I am having an issue with encoding and decoding HTML Entities on a textarea using ngModel. The Back-End needs and is sending the ><"&' as HTML Entities. This seems like it would be easy to do this, but for the life of me I can't think of a…
1
vote
0 answers

Errors Using Python urllib to read html

I am currently having trouble using urllib on python to open links. My code is basically intended to be able to take the link of an article (variable "url"), open the link (page = urlopen(url))), get the html from the website (html_bytes =…
1
vote
1 answer

Correctly removing html entities from a string

I have a problem with removing html entities from strings. I try System.Web.HttpUtility.HtmlDecode, and would like to see   being replaced with a regular space. Instead, a weird hex code is returned. I have read the following two topics and…
Leonard
  • 348
  • 1
  • 6
  • 20
1
vote
1 answer

C# how to decode html character squared ($sup2)

I am getting a string "lb/in²" (which I want to show as lb/in²) from server. I want to decode this and show it in my Xamarin.iOS app. I tried: System.Net.WebUtility.HtmlDecode("lb/in²") but its not working, still shows as "lb/in²".
Drunken Daddy
  • 7,326
  • 14
  • 70
  • 104
0
votes
0 answers

I cannot decode emojis stored in mysql database

I am using ent package for Encode and decode HTML entities in one of my nodejs project. An example conversion is given below var ent = require('ent'); let encodeString = ent.encode( 'Lorem Ipsum Dolor 542 O’ipsum for ❤️ dummy' )…
Ajith
  • 2,476
  • 2
  • 17
  • 38
0
votes
0 answers

HTML PHP pass the decoded link in the variable

I'm working on a project and hope someone can help me. I build a tool in Laravel which generates sales invoices and I would like to pass the link to the related document in the invoice. The thing is, that I don't have an access to the invoice…
Natalia
  • 55
  • 8
0
votes
1 answer

C# HtmlDecode from XElement (string) is not working

I working with a xml file. I get a string from it, and this string is encoding in html; I try to use HttpUtility.HtmlDecode but, it's not working... What am I missing? Screen
0
votes
0 answers

Decode query parameters for an HTTP call in a Web API

I have a Web API developed in C#, targeting the .NET Framework 4.7.1. It is used by some Angular front-end applications. Some of these applications are sending HTTP DELETE commands to the Web API, passing certain values as query parameters to the…
Eddie
  • 271
  • 4
  • 18
0
votes
1 answer

.Net Core System.Web.HttpUtility.HtmlDecode not working when the "&" symbol is there

string x = "&Microsoft<?xml version="; string y = System.Web.HttpUtility.HtmlDecode(x); Console.WriteLine(y); Console.ReadLine(); Now the y value is &Microsoft<?xml version= In this case the web.httputility.htmldecode not working I am…
0
votes
0 answers

How to stop 'html_entity_decode' reducing font size in smaller screens?

I am retrieving body text from the database in phpmyadmin. To remove the html entities I have written the following code:

However by adding the 'html_entity_decode', this reduces the font…
gilesj
  • 1
  • 6
0
votes
2 answers

How to deserialize a json string containing encoded HTML into JObject?

I have a json string containing encoded HTML as below which I get after doing a Shopify Liquid escape. I am trying to decode the internal HTML and deserialize this string into a JObject. { "testId": 494254, "languageIdentifier": "en_us", …
Na.B
  • 46
  • 6
0
votes
0 answers

HtmlDecode is not working for the following string c#

string testString = "a aa aaa aaaa aaaaa aaaaaa aaaaaaa aaaaaaaa aaaaaaaaa aaaaaaaaaa href=javascript:alert 1 ClickMe"; I used the following code to decode it, string a = HttpUtility.HtmlDecode(testString); …
Roger
  • 11
  • 1
0
votes
1 answer

html_entity_decode not working for some html entities like „

I have the following code: echo html_entity_decode("„", ENT_QUOTES, "UTF-8"); Result is „ but expected result is „. I also tried ISO-8859-1 instead of UTF-8, but it's still the same. Why isn't html_entity_decode working in this case?
David
  • 2,898
  • 3
  • 21
  • 57
1
2