New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Funky textField values when passing a list to select(options=list) #663
Comments
Is there a fix for this in version 1.4.6, for people who haven't made the jump to 2.0 as yet? |
Yes there is. |
https://github.com/cfwheels/cfwheels/releases/tag/v1.4.6 Nice one @perdjurner |
FYI, my company firewall blocks the "cfwheels.1.4.6.zip" link for some reason, so I used the "Source code (zip)" link to download 1.4.6. Are they different? |
File content should be the same (in terms of relevant code anyway). Thanks. |
My localhost is not worthy of 2.0. :) Also, |
Ok, I was able to verify it's still broken in 2.0. Sorry for the delay. |
This may fix the issue with Humanize() // add a space before every capitalized word
loc.rv = REReplace(arguments.text, "([[:upper:]])", " \1", "all");
// remove space after punctuation chars *Added*
loc.rv = REReplace(loc.rv, "([[:punct:]])([[:space:]])", "\1", "all"); Edit: removed the |
Found another issue. //test
#humanize("All AIMS users")#<br>
#humanize("FTRI staff")#<br>
//will output
All AIMSusers
FTRIstaff Replace // fix abbreviations so they form a word again (example: aURLVariable)
local.rv = REReplace(local.rv, "([[:upper:]]) ([[:upper:]])(?:\s|\b)", "\1\2", "all"); with // fix abbreviations so they form a word again (example: aURLVariable)
local.rv = REReplace(local.rv, "([[:upper:]]) ([[:upper:]])(?:\s|\b)(?![a-z])", "\1\2", "all");
//test
#humanize("Website (SP Referral)")#<br>
#humanize("Website ( SP Referral )")#<br>
#humanize("Website (( SP Referral))")#<br>
#humanize("All AIMS users")#<br>
#humanize("FTRI staff")#<br>
#humanize("aURLVariable")#<br>
#humanize("wheelsIsAFramework")#
//will output
Website (SP Referral)
Website ( SP Referral )
Website (( SP Referral))
All AIMS users
FTRI staff
A URL Variable
Wheels Is A Framework |
I think my last commit fixed that actually.
…On Wed, 25 Oct 2017 at 21:35, Bob Marley ***@***.***> wrote:
Found another issue.
//test
#humanize("All AIMS users")#<br>
#humanize("FTRI staff")#<br>
//will output
All AIMSusers
FTRIstaff
Replace
// fix abbreviations so they form a word again (example: aURLVariable)local.rv = REReplace(local.rv, "([[:upper:]])([[:space:]])(?![a-z])", "\1", "all");
with
// fix abbreviations so they form a word again (example: aURLVariable)local.rv = REReplace(local.rv, "([[:upper:]]) ([[:upper:]])(?:\s|\b)(?![a-z])", "\1\2", "all");
//test
#humanize("Website (SP Referral)")#<br>
#humanize("Website ( SP Referral )")#<br>
#humanize("Website (( SP Referral))")#<br>
#humanize("All AIMS users")#<br>
#humanize("FTRI staff")#<br>
#humanize("aURLVariable")#<br>
#humanize("wheelsIsAFramework")#
//will output
Website (SP Referral)Website ( SP Referral )
Website (( SP Referral))
All AIMS usersFTRI staffA URL Variable
Wheels Is A Framework
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#663 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJzU1M8Y8E6YK90cAHosB6Kjc7HpDBKks5sv41-gaJpZM4JmnC0>
.
|
Oops, you are correct. |
This is generally what I'm doing with a
select
in CFWheels 1.4.5 on CF9:But the list of
option
s generated ends up looking like this:Notice that the
value
s are OK, but there's weird stuff going on with spaces in the text displayed.I doubt this makes a difference, but the list is being returned by a function. I don't see why that would matter though.
The text was updated successfully, but these errors were encountered: