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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:47:23+00:00 2026-05-21T15:47:23+00:00

I was provided with a set of data that represents URL links. Such as:

  • 0

I was provided with a set of data that represents URL links. Such as: "doug'sfood.jpg".

.

I keep these strings in an array, and then select them randomly to display inserting them into an

<img src="doug'sfood.jpg"></img>

What Chrome is putting out is:

<img src="doug&#39;sfood.jpg"></img>

I tried replacing the quotes with a php escaped (\') apostrophe, but this just ended the quote prematurely.

Can someone help me? Thanks.

  • 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-21T15:47:24+00:00Added an answer on May 21, 2026 at 3:47 pm

    I think Chrome automatically escapes characters that are not correctly escaped.

    Always use:

    <img src="quote&#39;quote.jpg" alt="" />
    

    Instead of:

    <img src="quote'quote.jpg" alt="" />
    

    Certain characters should always be escaped in HTML, for example:

    ' -> &#39;
    & -> &#38; or &amp;
    

    Check the htmlspecialchars() and urlencode() functions, example:

    $string = "quote'quote.jpg";
    
    echo htmlspecialchars($string, ENT_QUOTES);
    // quote&#039;quote.jpg
    
    echo urlencode($string);
    // quote%27quote.jpg
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the swiss data set provided by R, which has the following form:
I have the following classes: Defect - represents a type of data that can
I have a set of data that contains parents and children. What I'm looking
I have a data set that should contain 14 columns, but when I read
I have a data set that looks something like this: Gender | Age |
Are there any open source applications that provide a set of features similar to
I am building an Eclipse plug-in that provides a set of core features in
The Java Virtual Machine Instruction Set page provides information about mnemonics such as aaload,
Is there any super set or language similar to javascript that provides a more
I have a modeled a set of objects that correspond with some real world

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.