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

  • Home
  • SEARCH
  • 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 856339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:13:08+00:00 2026-05-15T08:13:08+00:00

I have a number of currency values in a form select box (i.e. £2,500

  • 0

I have a number of currency values in a form select box (i.e. £2,500). When the form is rendered though it keeps the £ as is, is there any way to convert it to an actual pound sign?

  • 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-05-15T08:13:08+00:00Added an answer on May 15, 2026 at 8:13 am

    If I have understand your question correctly, the problem is that £ is automatically escaped by the form library and therefore displayed as £ to the user and not as £.

    You can probably solve the problem by telling django that the HTML code is safe and shouldn’t be escaped (might be a XSS security hole):

    from django.utils.safestring import mark_safe
    choices = (mark_safe('£ 2,500'), ...)
    

    Alternatively you can also avoid the usage of escape sequences by typing in the characters directly (those entities aren’t part of current HTML specifications anyway, you should simply use unicode instead):

    # -*- coding: utf-8 -*-
    choices = (u'£ 2,500', ...)
    

    The comment with the encoding must be the first line of the current file, telling the interpreter that you are using unicode encoding in the source file.

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

Sidebar

Related Questions

I have a number formatter set up to convert currency strings to decimal values.
I have a GWT project in which I need to manually specify currency, number
I'm stuck with the following scenario and appreciate any help/advice.. Requirement I have number
Is it possible to have PHP format currency values, for example: $200 will output
I would like to have a TextBox that displays a number in currency format
Our database stores values along with their associated format. Some number have 0 numbers
My (MySQL) tables have columns with currency values set as Decimal(10,2) with decimals separated
I have a application that needs to accept float or currency values in edit
I have a little problem with the current format of my negative currency number.
Is there a way to get an ASP.NET textbox to accept only currency values,

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.