Sorting accented strings that are also a link

Sorting accented strings that are also a link

JotasJotas Posts: 1Questions: 1Answers: 0

Hi,

I am trying to sort a table whose first column is a name (that can contain accents) that links to a different page, similar to:

<a href='landing_page.php?id=$numerical_id'>$name_with_or_without_accents</a>

With the default configuration, the sorting is done properly except for accented names.

So, I added the chinese-string plug-in that seems the best option to fix this problem.

However, now the sorting is even worse as, instead of sorting the names, it sorts the ids in the href.

Can anyone help me fixing this?

Thanks,

Jotas

Answers

  • allanallan Posts: 61,880Questions: 1Answers: 10,138 Site admin

    You would need to modify the chinese-string plug-in to strip the HTML since it is currently just string sorting. A simple regex would most likely do the job (it isn't perfect for removing HTML, but I doubt you'll run into issues unless you are nesting HTML in attributes!).

    Allan

This discussion has been closed.