We have moved to Github. Please open tickets there.

Opened 18 months ago

Closed 18 months ago

Last modified 18 months ago

#4173 closed Defect (fixed)

Adding bookmark doesn't work correctly (problem with accent caracter in title)

Reported by: duclos Owned by:
Priority: normal Milestone: Elgg 1.8.2
Component: Core Version: 1.8.1
Severity: annoying Keywords:
Cc: brett@…, florian.greinus@… Difficulty:

Description

Hello, when i try to save an adding of a bookmark with elgg bookmark plugin, Elgg redirects me on a wrong page. This is happening only when i put the accents caracters (like é or è or à or ñ).

By example, if i put a title like "tttté" i have this address :

"http://localhost/elgg-1.8.1/http://localhost/elgg-1.8.1/http://localhost/elgg-1.8.1/bookmarks/view/100/tttt"

instead of :

"http://localhost/elgg-1.8.1/bookmarks/view/100/tttt"

If i correct manualy web address it work !

Change History (9)

comment:1 Changed 18 months ago by duclos

This a general problem. The same error occure with page plugin. blog plugin...

comment:3 Changed 18 months ago by cash

  • Milestone changed from Needs Review to Elgg 1.8.2

Poorly documented feature of PHP: \w is influenced by locale

comment:4 Changed 18 months ago by cash

  • Resolution set to fixed
  • Status changed from new to closed

Fixes #4173 removed use of \w since it is locale sensitive

Changeset: 24786872cdee97470016998ff170c99b00054167

comment:5 Changed 18 months ago by fgreinus

  • Cc florian.greinus@… added
  • Component changed from Bookmarks to Core
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version changed from 1.8.1b1 to 1.8.1

I implemented the Changeset from GIT (http://trac.elgg.org/changeset/24786872cdee97470016998ff170c99b00054167 into my upgraded 1.8.1 and the error still appears.

I just added the line: $title = preg_replace("/[A-Za-z0-9_ ]/", "", $title);

On my site those problems appear with german "umlauts", so chars like "ö,ä" etc.

comment:6 Changed 18 months ago by cash

Can you provide an example? Either a link to a page on your site or a description of what the title is and what the link is

comment:7 Changed 18 months ago by fgreinus

For example it's in the "Last Comments" view at the blog-site (core-plugin). There it is for example the Title "Sara Könemann" and the link should be: http://domain.de/profile/K%C3%B6nemannSar (or http://domain.de/profile/KönemannSar
but it is like that:
http://domain.de/http://domain.de/profile/K%C3%B6nemannSar

comment:8 Changed 18 months ago by cash

  • Resolution set to fixed
  • Status changed from reopened to closed

Thanks for the example. That's a different bug (but related). That bug is here: #4190

comment:9 Changed 18 months ago by cash

Fixes #4173 removed use of \w since it is locale sensitive

Changeset: 24786872cdee97470016998ff170c99b00054167

Note: See TracTickets for help on using tickets.