Questions tagged [html-encode]

Anything related to encoding or decoding HTML entities.

Specifying the document's character encoding

There are several ways to specify which character encoding is used in the document. First, the web server can include the character encoding or charset in the Hypertext Transfer Protocol () Content-Type header, which would typically look like this:

Content-Type: text/html; charset=ISO-8859-1

This method gives the HTTP server a convenient way to alter document's encoding according to content negotiation; certain HTTP server software can do it, for example Apache with the module mod_charset_lite.

For HTML it is possible to include this information inside the head element near the top of the document:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

also allows the following syntax to mean exactly the same:

<meta charset="utf-8">

Character encoding in HTML: http://en.wikipedia.org/wiki/Character_encodings_in_HTML

599 questions
-1
votes
1 answer

Jquery HtmlEncode data to cookie

I am using the jQuery cookieplugin, and want to save the values from a CKEditor into a cookie, to be able to make a draftfunction, a bit similar to the one on StackOverflow. The CKEditors content can contain html, so is there a way to htmlencode the…
Dofs
  • 13,655
  • 25
  • 72
  • 120
-1
votes
1 answer

How can I propagate html strings in a Yew application?

Let's say a Yew app currently uses, { "foo" } How can I emit that in such a fashion that it's not safely encoded as HTML, and instead rendered by the client as HTML and sent out unencoded.
user157251
  • 64,489
  • 38
  • 208
  • 350
-1
votes
2 answers

Why isn't font rendered in HTML when surronded by "

I have some HTML stored in a database and I am generating an static HTML file out of it. However when i open the file in the browser, the font doesn't render as I expect it. I have tracked down the problem and I see it is because of & quot;

Stackedup
  • 517
  • 5
  • 20
-1
votes
1 answer

How to store original iframe markup into database without html encoding

I am new in PHP and I have wysihtml5 editor in my form and when I am adding iframe code in editor to store value into database iframe code encoded like: <iframe width="560" height="315" src="
Mr.Happy
  • 477
  • 1
  • 7
  • 20
-1
votes
3 answers

Print Javascript Array Value Properly

So I have a javascript array and in the array I have this: var quiz = [{ "question": "What is the greatest common factor of 105 and 126?", "image": "", "choices": ["3", "7", "9", "21", "35" ], "correct": "21", …
Abdul Diaz
  • 17
  • 5
-1
votes
2 answers

Turn off html processing in mediawiki

I want to turn off the built in html processing of links in mediawiki. For example, I want to edit the Sidebar (MediaWiki:Sidebar) by adding a link with question marks and equal signs (i.e. Special:CustomNeed?page_title=Name+with+spaces), but the…
EngJon
  • 927
  • 7
  • 18
-1
votes
1 answer

Rightmove XML Entities

We have a site which provides data to Rightmove via an XML file. However, we're seeing a small issue with special characters being displayed with odd symbols. For example, when smart quotes are pasted into our data source (Drupal CMS) the characters…
0Neji
  • 965
  • 1
  • 10
  • 30
-1
votes
1 answer

Split html document while maintaining inner tags

I'm working on an e-shop. At some point in my code I have to show attributes and descriptions for many products in a single page.Attributes are a table and description can contain simple text and table,li,br tags etc...These which are stored in the…
Anonymous
  • 3,564
  • 3
  • 32
  • 56
-1
votes
1 answer

Ampersand encoding in img src

I am trying to display an image (gravatar), but the ampersand in its link seem to be problematic. At first, I had: & in url
Yosko
  • 187
  • 1
  • 3
  • 12
-1
votes
1 answer

XML is automatically encoding

I am trying to dynamically create XML but i've run into a snag, for somereason it's automatically encoding the < and >, i need it to stop that because it's breaking my tags but i can't see anywhere in my function it's tell it to encode. function…
NekoLLX
  • 175
  • 5
  • 17
-2
votes
1 answer

Perl script with library function produces no output

I created this small little maintenance script to unescape HTML entities. use HTML::Entities; use warnings; while ( <> ) { decode_entities($_); } The problem is, it produces no output when I pipe it through bash like so, echo ""a""…
-3
votes
5 answers

Replace ' with ' in javascript

I have a javascript variable that fills with Laravel translation system: 'are_you_sure' => '¿Remplacer l\'arbre?', and then in JS: swal({ title: "{{ trans('msg.are_you_sure') }}", ... }); And it appears to me: ¿Remplacer…
Juliatzin
  • 14,437
  • 26
  • 115
  • 241
-3
votes
1 answer

Is there a better way to decode html directly on Android?

I've got encoded html where even tags are encoded into html entities Some <b> bold </b> text I'd like to display this as a spanned string in TextView, however the only way to do it is using Html.fromHtml() twice val decoded =…
Lamorak
  • 10,190
  • 8
  • 44
  • 55
-3
votes
1 answer

Should I save in db - user input as html encode?

We're having conflict with coworkers on whether we should htmlencode user input and then save it to db ( vs saving it straight forward as it is) I also found various answers which says that DB should save the plain(!) input. Why ? because DB should…
Royi Namir
  • 131,490
  • 121
  • 408
  • 714
1 2 3
39
40