Closed (fixed)
Project:
Clipper
Version:
master
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Dec 2005 at 15:22 UTC
Updated:
20 Mar 2006 at 16:31 UTC
Jump to comment: Most recent file
When selecting parent entries, if the node title has an apostrophe in it (') then clipper complains that the node doesn't exist.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | clipper_0.patch | 2.02 KB | keve |
Comments
Comment #1
sami_k commentedReplicated.
Comment #2
sami_k commented& and most likely any special html entities will likely break clipper.
Comment #3
keve commentedA better approach would be to find 'nid' that corresponds to the matched 'title' with autocomplete, but insert the 'nid' into the form as value. Then at node_api update/insert it would save the 'nid' value, which would not cause any trouble.
Comment #4
Bèr Kessels commentedkeve, I like your idea, can you provide a patch?
Comment #5
Bèr Kessels commentedComment #6
keve commentedI have not done the new approach, but made some bugfixes.
I removed check_plain() for parent titles, i think node_load is protected against sql injection.
Comment #7
keve commentedI also removed trim() since in Drupal node title can begin and end with whitespaces.
Comment #8
Bèr Kessels commentedI am a bit confused: shouldnt the regexp in clipper_autocomplete already grep out charachters?
I fail to see (but then again, I am no regexp guru) why all that pattern replacing on _insert is required.
So, please explain a bit more in detail what the problem is and what the solution provided does. I cannot oversee the curernt solution, and what it tries to do.
Bèr
Comment #9
keve commentedAt autocomplete, If title has " or , in it, autocomplete puts title inside "". It also replaces " with "" in the title.
Eg:
foo "bar" => "foo ""bar"""
Consequently at _insert and _validate i need to remove those " apostrophes to get original title back. with:
Comment #10
sami_k commentedThanks for the patch, keep up the good work...!
Comment #11
keve commentedBug for my patch: html special chars breaks autocomplete:
But when i try to insert 2nd entry with autocomplete (and 1st entry has any htmlspecial char in it # of &), it does not suggest any node title.
_insert, _validate works all right w/ them.
Comment #12
Bèr Kessels commentedComment #13
sami_k commentedOn review, the bugs that he's talking about actually keep it from giving suggestions... the childof works but it breaks the autocomplete. I am looking at this right now, will update in a bit. I would not suggest committing this before it's bugfree.
Comment #14
Bèr Kessels commentedThanks a lot keve. Committed.
I committed your confirmation message separate. please try to not add in features when fixing a bug. :)
Comment #15
sami_k commentedOn my screen i am not getting suggestions with that patch... the childof functionality works, but the suggestions don't... Ber or Keve can you confirm this?
Comment #16
sami_k commentedI guess it's better committed than not, even if autocomplete is not functioning with htmlspecialentity titles.
Comment #17
Bèr Kessels commentedWe need to figure out that latest issue. RE-opening
Comment #18
sami_k commentedwhat if the node id was appended to the title, node->clipper_parent... so "title [nid]" and the nid was actually used when inserting into node relations...? that sounds doable... any thoughts? i think if this module is to be any real use it must be able to attach properly to different nodes with the same name, right now it will append it to the first node with the name, just tested that...
Comment #19
Bèr Kessels commentedplease do not hijack this issue for other issues. The 'more then one node with the same title' bug is dealt with elsewhere.
Comment #20
sami_k commentedsorry about that.
Comment #21
keve commentedAutocomplete works for me even with 'childof'.
Only if title of child includes htmlspecial char, it breaks autocomplete.
Comment #22
Bèr Kessels commentedmoving to a new issue. it is not really related.
Comment #23
(not verified) commented