• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

image not loading because double-quotes not being removed from path

Explorer ,
Sep 15, 2014 Sep 15, 2014

Copy link to clipboard

Copied

I built my image paths and did a cfdump to check what is being produced:

<!--- Build image paths --->

<cfset image_src="../images/f#movie.FilmID#.jpg">

<cfset image_path=ExpandPath(image_src)>


<cfdump var="#image_src#"><br>

<cfdump var="#image_path#">

I get the following when I run the page:

../images/f5.jpg

C:\ColdFusion11\cfusion\wwwroot\workspace\OWS\images\f5.jpg

When I right-click on the image place holder and copy the image URL into a browserr address bar, what is being passed is:

http://127.0.0.1:8500/workspace/OWS/10/%E2%80%9D../images/f5.jpg%E2%80%9D

so, it is not taking out the ".. and " from around the image location of the following line as it expands the URL:

<cfset image_src="../images/f#movie.filmid#.jpg">

On another page I deleted the double-quotes and then put them back in and that worked. For some reason it didn't like the double-quotes that were there and didn't recognize the code correctly until I replaced them. I can't get that same solution to work here on this page.

Any help/suggestions? Thanks!



Views

204

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Sep 15, 2014 Sep 15, 2014

I just figured out that I must have cut and pasted from a website and it added MS "smart quotes" to my code.  Apparently I had these "smart quotes" in more than one place in my code.  Once I replaced them all my code worked just fine.  Thanks!

Votes

Translate

Translate
Explorer ,
Sep 15, 2014 Sep 15, 2014

Copy link to clipboard

Copied

LATEST

I just figured out that I must have cut and pasted from a website and it added MS "smart quotes" to my code.  Apparently I had these "smart quotes" in more than one place in my code.  Once I replaced them all my code worked just fine.  Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation