Getting wildcards with Jinput->get - jinput

I seems Jinput->get removes all wildcards like * and %. Is that correct?
I have user input for a 'place of birth' of a person. So if someone enters Amsterd*, then through Jinput->get I get back Amsterd, without the wildcard.
Is there something I do wrong? Or is it Jinput?

Related

(Solved))The result could not be loaded-jquery-select2

I’ve got a problem.
The select box of “Job No.#” can render data from MySQL, but the select box of “Address” cannot.
Field “address” and field “job_number” come from the same table.
But if I create a new field, like “newAddress”, with the same data as in “address”, it works~,
But just changing the “address” to “newAddress” doesn’t work.
In addition to the “address” field, several other fields in this table cannot be rendered either.
The database structure should be ok~ because I am able to fetch() and print the data from the “address” with the same SQL sentence.
And it is working all right on other tables~
Could you please? Thank you very much!
I've solved it!
The reason is a kind of “-” symbol input by users before.
The "-" is longer than normal -.
json_encode() cannot encode it, and it is displayed as garbled code when I print it out directly.

Do URL specifications say that the #anchor must appear after the ?parameters

I've noticed that
https://someurl.com/page.html#anchor?utm_campaign=xyz
Does not correctly find the anchor in the page, but
https://someurl.com/page.html?utm_campaign=xyz#anchor
does work.
I've looked through https://datatracker.ietf.org/doc/html/rfc3986 and as far as I can see, there's nothing specific about where the #anchor needs to appear, only that the # symbol denotes the anchor in the same way that ? denotes the start of URL params.
So, where would I find in the specifications that it must appear at the end? Or are my browsers secretly non-conformant? I'm asking so that I can provide evidence to a customer one way or another.

Looking to fill out most or all of the Fed Ex "Create Label" page using URL query string

Looking to create a shipment on www.fedex.com
But fill out most of the fields using a query string at the end of a URL.
Seems like this might not be possible, but need help figuring out how to know whether it is or not.
My "Create Labels" page has a URL ending in -- ?method=doInitialize&utype=null ,
or else sometimes ...
-- ?method=doEntry&link=1&locale=en_US&urlparams=us&sType=F
so it seems promising. Just not sure how to access the names of the required fields (Contact name, Address 1 and 2, etc ) besides guess and check.
Thanks!
--------- Destination Section Parameters Found
The query string parameters for the destination contact field are, at the time this answer was written :
toData.addressData.contactName
toData.addressData.addressLine1
toData.addressData.addressLine2
toData.addressData.zipPostalCode
toData.addressData.city
toData.addressData.stateProvinceCode
toData.addressData.phoneNumber
psdData.mpsRowDataList[0].weight
Of course, they need to be appended to the original URL using valid query string syntax and URL encoding.
--------- How Were These Found ?
These were each found using the page inspector. I found that it is important to cut through the noise by zeroing in on the exact field where the data needs to be entered, and opening up the page inspector to that location.
Right click (Win) or control click (Mac) > "inspect"
This will bring up the following text in the inspector. By trial and error, I discovered that the "name" fields correspond to the working query string parameters.
The part we are looking for :
This corresponds to the query string parameter ...
toData.addressData.addressLine1
... originally listed above.
--------- Unsolved Parameters
It's a mystery why this same rule doesn't apply in the same way to other values in the page, like service type (e.g. "Priority Overnight") or package type (e.g. "FedEx Box"). The following, for example, do not fill as expected, even when using the exact same "name" field from the page inspector.
psdData.mpsRowDataList[0].carriageValue
psdData.serviceType
psdData.packageType
billingData.referenceData.yourReference
Maybe it's a URL encoding issue? Anyway, hope this helps.

URL: Include a parameter inside a destination query

I've searched a lot to try and solve this problem, but I'm not quite sure what to search for. I didn't really manage to find anything.
Essentially I'm working on a website in which users can register for an event. However, if the user is not logged in, I need to redirect them to the registration screen. This much I've been able to accomplish without much difficulty. However I need to redirect back to the event that they attempted to register for.
My real problem is that the URL of the page I need to return to contains an a parameter, and I'm not sure how to make the registration page take that parameter into account when it redirects back.
Currently when an anonymous user tries to go to
http://[...].com/drupal/?q=civicrm/event/register&id=6
I have it redirect you to
http://[...].com/drupal/?q=user/register&destination=civicrm/event/register&id=6
However, once the form is submitted the "&id=6" is not taken as part of the destination parameter, which means you just go to.
http://[...].com/drupal/?q=civicrm/event/register
Which is not a valid page.
Is there a way for me make the destination parameter include "&id=6"?
On a whim I've also tried.
[...]destination='civicrm/event/register&id=6'
[...]destination="civicrm/event/register&id=6"
[...]destination=civicrm/event/register#id=6
You need to url-encode the value for your destination. Try this:
[..]destination=civicrm/event/register%3Fid%3D6
%3F is hex code for question mark (?), %3D is code for equals (=).

Thinking sphinx word match

The data what i have is
kiran#test.com - first record
kiran1#test.com - second record
I need to search using the email address. I have forums and users indexed in my web app.
First scenario
I kept the '#' symbol in the charset table which is working fine problem is for example if the search keyword as 'kiran#test.com' it is giving me the exact result but if i user only 'test' no results found.
Second scenario
If i won't keep '#' symbol in the charset table. If the i use 'kiran#test.com' i am getting both the results and for 'test' also i am getting both the results
Expected Scenario
If i use the entire email 'kiran#test.com' - I need to get only first record
If i use only 'test' - I need to get both the records
In plain mysql something like "select users where email like '%search-key%'"
I use the following code for searching
ThinkingSphinx.search params[:search_key],:star => Regexp.new('\w+#*\w+', nil, 'u') (I don't want to treat '#' as the separator)
Please suggest me any options i can pass to achieve the expected result.
Thanks
Kiran
Take a look at blended char support
http://sphinxsearch.com/docs/current.html#conf-blend-chars
Or if you really what [ email like '%search-key%'" ] style support maybe min_infix_len. (leaving . and # in charset table)
To search for full email you could use Phrase Search operator.
http://sphinxsearch.com/docs/current.html#extended-syntax
So, if you could determine search query as email use "phrase search" otherwise use general search.

Resources