Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8777939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:24:05+00:00 2026-06-13T19:24:05+00:00

I am using Google Go on Google App Engine. I am saving a string

  • 0

I am using Google Go on Google App Engine. I am saving a string description in a structure into a datastore, like so:

type Foo struct{
    Bar string
}

That description includes html tags, for example:

<a href="/">Bar</a>

I want the html template to include that description in an html file so it would be parsed as html. For example:

<html><head><title>Title</title></head>
<body>{{.Bar}}</body></html>

to be parsed as:

<html><head><title>Title</title></head>
<body><a href="/">Bar</a></body></html>

but instead, I get something like this:

<html><head><title>Title</title></head>
<body>&lt;a href=&#34;/&#34;&gt;Bar&#39;s&lt;/a&gt;</body></html>

How can I make the template parse the string correctly into an html link?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T19:24:07+00:00Added an answer on June 13, 2026 at 7:24 pm

    The "http/template" package automatically escapes all strings. To get around this you must make the value of type template.HTML. E.g.

    import "html/template"
    
    type Foo struct {
        Bar template.HTML
    }
    

    And then in your code do something like:

    Foo.Bar = template.HTML(barString)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking into using Google App Engine for a project and would like
I am using google app engine and would like to download tweets from a
I'm using Google App Engine and I need to put a multiline string in
I'm using the YouTube Direct for Google App Engine. I go into the Admin
I am using Google App Engine with the Datastore interface. Whenever I'm trying to
Our application is using Google App Engine and DataStore for the server side. We
I am using Google App Engine Python. I would like to store a simple
Using Google App Engine and GQL and Python: in my datastore I have something
I'm using Google App Engine with their webapp framework. Is there something like Django's
Using Google App Engine, I am trying to urlfetch a gzip file from a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.