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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:11:09+00:00 2026-05-18T22:11:09+00:00

Everytime I am trying to combine a string with a link_to it is outputting

  • 0

Everytime I am trying to combine a string with a link_to it is outputting in my browser as escaped HTML.

eg.

%(TEST #{link_to(object.title, object)})

OUTPUTS

TEST <a href="/objects/3">TEST OBJECT</a> 

Why is this happening ? Every example I see on net the link_to does not get escaped.

  • 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-18T22:11:09+00:00Added an answer on May 18, 2026 at 10:11 pm

    Output is escaped by default in Rails 3. If you append .html_safe to your string it will do what you expect.

    %(TEST #{link_to(object.title, object)}).html_safe
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to load a very basic XML document but everytime I get
I am trying to open a Socket on Android but everytime I try I
Trying to insert 315K Gif files into an Oracle 10g database. Everytime I get
Everytime I test the email is send correctly. (I have tested in PC: IE6,
Everytime the IWpfTextView's TextBuffer changes I am trying to get the history's redostack and
I'm trying to use jquery to clone a table row everytime someone presses the
when trying to create a simple procedure in mysql 5.1.47-community it fails everytime i've
I am trying to insert a value to a SQLite db, but everytime I
I'm trying to receive the html of a website. For now I've tried it
I am trying to export a report but everytime it runs the code to

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.