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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:58:47+00:00 2026-05-29T06:58:47+00:00

I have an MVC 4 application that I’m localizing. All the built-in resourcing and

  • 0

I have an MVC 4 application that I’m localizing. All the built-in resourcing and Model attributed content is appearing fine, but where I localized content written for JQuery the encoding appears wrong. Here is an example of how things render, note the red boxes… they should be the same word.

enter image description here

The problem appears to revolve around the below line of code in my View:

$("#FirstName").Watermark("@Resources.ApplicantGivenNameWatermark");

This JQuery essentially takes in a string and then writes it to the input when no other value has been supplied. Here is an abstract of that code:

$.fn.Watermark = function (text) {
    return this.each(
        function () {
            var input = $(this);
            map[map.length] = { text: text, obj: input };

            //Similar removal process lies here, this one also removes the style

            function insertMessage() {
                if (input.val().length == 0 || input.val() == text) {
                    input.val(text);
                    input.addClass("watermark");
                } else
                    input.removeClass("watermark")
            }

            input.focus(clearMessage);
            input.blur(insertMessage);
            input.change(insertMessage);

            insertMessage();
        }
    );
};

Any ideas on how to resolve this would be appreciated. As a side note, I’ve been able to reliably recreate this in a wide range of browsers.

  • 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-29T06:58:48+00:00Added an answer on May 29, 2026 at 6:58 am

    Try to put this at the begin of the function:

    text=$('<span>'+text+'</span>').text();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a MVC application that works fine; but now i need to put
I have an ASPNET MVC application that works fine locally but when I deployed
I have an asp.net mvc application that works fine under visual studio but when
I have an MVC application that is using MEF for the controllers, all working
I have made a MVC application that uses the built-in ASP.NET login functions. It
I have a MVC application that I'm near completing. But I have a situation
I have an MVC application that consists of a directory with all the necessary
I have an MVC application that is shared by many websites in IIS, but
I have an MVC 3 application that works fine when running locally from visual
I have an mvc application that I allow businesses to log in using https://storea.mydomain.com

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.