inherit
\o/ ^o^ /o_ /o\
16464
0
Jul 22, 2024 13:57:10 GMT -8
pawl
29,621
November 2003
pollo
Pink Stars
|
Post by pawl on Mar 14, 2013 17:34:13 GMT -8
Just encountered a minor problem when responding to this thread. My test page for the thread was here, for reference. The custom field I'm using is a text field set to URL-only, and contains a link to the Google homepage. The code I'm using for that section of the miniprofile is (relevant in bold); {foreach $[user.mini_custom_field]} {if $[user.mini_custom_field.name] == custom_url}<br /><a href="$[user.mini_custom_field.value]">Test</a> {else} <br /><span class="$[user.mini_custom_field.content_class]">$[user.mini_custom_field.name]: $[user.mini_custom_field.value]</span> {/if} {/foreach}I would expect that to show link any other link, however, the miniprofile displays the following; Posts: 1 www.google.com">Test Member is Online When using Chrome's 'Inspect Element', I get the following; <a href="<a href=" http: www.google.com" target="_blank" rel="nofollow">http://www.google.com</a> "">Test " <br> Just wanted to know if this was a mistake at my end, or an actual bug. =]
|
|
#e61919
Support Manager
154778
0
1
Nov 25, 2024 15:31:44 GMT -8
Michael
19,618
May 2010
wiseowl
|
Post by Michael on Mar 15, 2013 10:53:51 GMT -8
Since it seems like when code is involved I always misjudge something, I'll have someone more code-experienced then me confirm this first. I'll update this when I know more. Update: So I tested this out with Woop and Tim. We discovered that for some reason HTML in the custom field hates double quotes. Using a single quote: <a href='$[user.mini_custom_field.value]'>Test</a> Everything works as intended. Double quotes: <a href="$[user.mini_custom_field.value]">Test</a> cause text to be escaped. Double quotes is the proper way to do HTML attributes. I filed a bug report for this after confirming with Tim.
|
|