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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:30:42+00:00 2026-06-09T10:30:42+00:00

I am using a web2py application, in that I have a requirement like, In

  • 0

I am using a web2py application, in that I have a requirement like, In my first page I have to create an web2py DIV() tag, display it and store that value in database. And in the second page I have to get this database value and add this inside a TABLE() function.

It is not throwing error. But In the second page view the division content is display as XML, instead of display as HTML.

So inside my HTML table I am getting the value as <div style="float:right">content</div>

I think the DIV() is stored in the database as xml(). How can I convert this xml() back to DIV().

  • 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-09T10:30:44+00:00Added an answer on June 9, 2026 at 10:30 am

    The database is storing the original HTML. However, any text written to a web2py view is automatically escaped, so the HTML code displays literally rather than being rendered as HTML. To avoid that, as you have pointed out, you can simply wrap the HTML in the XML() helper.

    Be careful, though — you should not do this with input entered by users. A malicious user could enter Javascript code, which could create a security vulnerability for other users viewing that content (this is why web2py automatically escapes everything in the first place). To be safer, you could also do XML(..., sanitize=True).

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

Sidebar

Related Questions

I have an existing web2py application. Now I need to create a new registration
I have a web application that has been done using Cakephp with MySql as
I am writing a web2py application that requires summing dollar amounts without losing precision.
I am building an app using Web2py framework... I don't want to have to
I am using web2py to write a search engine like app. Is it possible
I have made a web interface for my project using web2py and configured login
It looks like using CouchDB with the standard web2py DAL is still a ways
Using report builder 3.0, I have a report that queries a cube. How do
I'm using web2py in combination with a javascript client via jsonrpc. I noticed that
I am using Web2Py to create a simple app which sends Push notifications through

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.