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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:36:06+00:00 2026-05-25T21:36:06+00:00

I store some RTL language strings – which have some HTML tags embedded –

  • 0

I store some RTL language strings – which have some HTML tags embedded – in a DB. When I echo these strings on an HTML page these are rendered correctly. However, when I place these same strings in a <textarea> the HTML tags are all messed up.

Here below is an example (you’ll need to copy paste it in an HTML file). As you can see the tags are rendered corrrectly in the <div> but are totally messed up in the <textarea>.

Does anybody know how to ensure that even visually the tags look correct? I am placing this text in a textarea for editing so it needs to be correct.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<html dir="ltr">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>

<div dir="rtl">اسحب هذه الرسالة إلى اعلى الصفحة و <strong><a href="javascript:void(0);" id="demo-start">اضغط هنا</a></strong> لتبدأ.</div>

<br />
<textarea dir="rtl" rows="12" cols="50">اسحب هذه الرسالة إلى اعلى الصفحة و <strong><a href="javascript:void(0);" id="demo-start">اضغط هنا</a></strong> لتبدأ.</textarea>

</body>
</html>

Note
Somehow I believe it has to do with the &lrm; or &rlm; mark, but I have no idea how.

  • 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-25T21:36:07+00:00Added an answer on May 25, 2026 at 9:36 pm

    Change the dir attribute of the textarea to ltr. It will format fine.

    jsfiddle of the updated markup.

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

Sidebar

Related Questions

My goal is to store some html-formatted data in a variable, then echo it
I want to store some additional data on an html page and on demand
I need to store some data in a Django model. These data are not
I have to store some intervals in mssql db. I'm aware that the datetime's
I may have to store some i18n-ed data in my database using XML if
If I want to store some strings or matrices of different sizes in a
i'm trying to store some values in the Session from a Handler page ,
In my app I store some user data in two .plist files which already
I need to store some data in an ini file, and I have run
I would like to store some articles (blog posts) in a mysql table, these

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.