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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:27:45+00:00 2026-06-07T23:27:45+00:00

I am using Base encode like below enc = Base64.encode64(‘mystring’) Output : "U2VuZCByZWluZm9yY2VtZW50cw==\n" But

  • 0

I am using Base encode like below

enc = Base64.encode64(‘mystring’)

Output : "U2VuZCByZWluZm9yY2VtZW50cw==\n"

But when i use this output to set some div ids in the html page,
actual encryption is not shown. As you can see in the above sample, '\n' turns out to be a line break when using in html page. And the id of the div now becomes id="U2VuZCByZWluZm9yY2VtZW50cw=="
but expected is U2VuZCByZWluZm9yY2VtZW50cw==\n

is there any solution for this or any alternatives?

  • 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-07T23:27:47+00:00Added an answer on June 7, 2026 at 11:27 pm

    Try

    Base64.urlsafe_encode64
    

    It removes the new line and uses – instead of + and _ instead of /

    You do of course then have to use Base64.urlsafe_decode64 to decode it.

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

Sidebar

Related Questions

In CodeIgniter I'm using a base CRUD My_model , but I have this small
Hi I am using base 64 encoding for my string but I am getting
I'm thinking about using the encode/decode technique here (Encoding to base 36/decoding from base
I started using Base.js for a class inheritance. In Base.js a class should be
I am using form base authentication in my Sharepoint site. On my login page
We are using a base class where we set the background picture. That code
I have a small code base using Subsonic 2.1 in my project. I would
when accessing foo() of base using derived class's object. #include <iostream> class base {
For my tests I'm using a base class MyTestBase defining a method setup() that
I need to insert Chinese characters inside Oracle Data base using Java (hibernate 3.0

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.