Bob, you might remember this as you help me setup the forms I used for this. Basically a user is submitting this text to my form
http://preview.traxsource.com/files/previews/nctgd038-3261--1-we_love_house--dave_floyd_&_pook-p.mp3
but it shows up until the character before the &
http://preview.traxsource.com/files/previews/nctgd038-3261--1-we_love_house--dave_floyd_
all strings/urls I receive with the &, gets cut off at that char.
Aaron
It depends on where they are being cut off. Checking that may take a little detective work.
Looking on Wikipedia http://en.wikipedia.org/wiki/Filename
Note 1: Most Unix shells require certain characters such as spaces, <, >, |, \, and sometimes :, (, ), &, ;, as well as wildcards such as ? and *, to be quoted or escaped:
So if the file is being uploaded OK then you probably need to rename it.
If it's not being uploaded correctly then there isn't much you can do except ask the users to use 'better' file names.
Bob
Aaron
Reserved:
Many URL schemes reserve certain characters for a special meaning:
their appearance in the scheme-specific part of the URL has a
designated semantics. If the character corresponding to an octet is
reserved in a scheme, the octet must be encoded. The characters ";",
"/", "?", ":", "@", "=" and "&" are the characters which may be
reserved for special meaning within a scheme. No other characters may
be reserved within a scheme.
Read more: http://www.faqs.org/rfcs/rfc1738.html#ixzz0oYvzBJi1
Bob
I'm not sure what you are getting at here in this last post. The URL is completely valid and regardless of it's validity... the form shouldn't being the GATEKEEPER of the URL formatting. How ever that text is passed to me or not, she be delivered the way as it is sent.
The browser on the other hand will determine *what should I do* with this malformed URL, not the form. The form needs to pass it as it comes and that is what the issue is.
Aaron
I'm sorry, I misunderstood your earlier post. The fact that it's a URL -- invalid or not -- is irrelevant if you are just saving a text string from an input.
I've just checked with a test form and ChronoForms has no problem with that url-string. It's saved to the database and added to an email exactly as it should be.
Bob
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Audio clip:</label>
<input class="cf_inputbox required validate-url" maxlength="200" size="30" title="Link to the audio clip on Choicetrax" id="text_9" name="urls" type="text" value='<?php echo $audio_clip; ?>' />
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Audio clip: :: URL to the audio clip</div>
</div>
<div class="cfclear"> </div>
</div>
This sounds, to me, as if the browser does not properly encode the form data before sending the POST data block.
Do you experience any issues with extended charsets (I.E. umlauts: å, ä, ö and similar)?
/Fredrik
This from the site:
<b>
is the link getting from my site to yours correctly? if so, where is it getting cut off - on insertion into the database or querying from the database?
either way, it's something to do with that ampersand character. what database are you using? i'm using mysql, and i don't think you have to do anything special to escape an ampersand. but i have seen before that oracle has a problem with it when storing an ampersand. it's somehow used to denote a variable, so what i've had to do with oracle is split it at the ampersand, doing something like:
update table set url = 'http://preview.traxsource.com/files/previews/nctgd038-3261--1-we_love_house--dave_floyd_&' || '_pook-p.mp3'
where id = 123...
not sure if that's what's going on but maybe it'll help.
and yeah, been seeing a lot of traffic yesterday! hope it'll keep up. 🙂
dave
</b>
Aaron
Could you post a link to the form (here or in PM)?
Joomla only uses MySQL databases, same with ChronoForms. Further, ChronoForm uses various features within Joomla to make sure any and all queries are safe. Also, the only special function of & in MySQL, is that it may be used as a bitwize AND-operator. It will not, however, be interpreted as an operator within a string. As such, I doubt this is a database-related error.
/Fredrik