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 8972843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:18:55+00:00 2026-06-15T18:18:55+00:00

mymodel.url is textproperty(string) which is something like this <a href =’http://www.abc.com’><img src=’http://xyz.com/></a><img src=http://www.abcdefd.com />

  • 0

mymodel.url is textproperty(string) which is something like this

<a href ='http://www.abc.com'><img src='http://xyz.com/></a><img src="http://www.abcdefd.com" /> 

In index.html, if I use {{mymodel.url}}, I will see the html code in my browser. In otherwords, jinja2 consider {{mymodel.url}} as string.

<a href ='http://www.abc.com'><img src='http://xyz.com/></a><img src="http://www.abcdefd.com" /> 

I want to see the image in my browser. How can I do it?

  • 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-15T18:18:57+00:00Added an answer on June 15, 2026 at 6:18 pm

    You have to indicate to jinja2 that this content is “safe” to display in a browser as HTML

    {{mymodel.url|safe }}
    

    HTML Escaping

    When generating HTML from templates, there’s always a risk that a variable will include characters that affect the resulting HTML. There are two approaches: manually escaping each variable or automatically escaping everything by default.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My model and collection looks like this. var MyModel= Backbone.Model.Extend({ foo: function(){ alert(is not
Given this class: class MyModel < ActiveRecord::Base belongs_to :association1 belongs_to :association2, :polymorphic => true
I cannot run ['abc'].append( MyModel.objects.all() ) since it generates exception 'NoneType' object is not
I have a model similar to this: public class myModel { public ClassA ObjectA
Snippet taken from this question from django.db.models import F ... MyModel.objects.filter(id=...).update(hit_count=F(hit_count)+1) It was suggested
I have a View with url like /Home/SetResults?patientId=[somePatientId] , part of it gets conditionaly
my model is like: class Modeloxy(models.Model): ... ... slug = models.slug() class mymodel(models.Model): marca
I need to create a method which can be called so list_of_hash_values = MyModel.values_and_links
Someone inputs www.example.com/3/ I have a model with a charfield that I can slugify.
This is my front-end code (using fetch ) var MyModel = Backbone.Model.extend(); var MyCollection

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.