Hi,
thanks for your post, and sorry for the trouble.
Most likely, we’ll need a small code change here. For me to verify, can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!
Regards,
Tobias
Yeah, no problem: https://www.lnpgaceta.org/statistics/.
This is the shortcode:
[table id=37 highlight=”Adjuntas||Aguada||Aguadilla||Aguas Buenas||Aibonito||Añasco||Arecibo||Moca” highlight_full_cell_match=”false” /]
This is the Plugin Options code I’ve got:
`.tablepress-stat .highlight-adjuntas {
background-color: #57267e !important;
color: #00e000 !important;
}
.tablepress-stat .highlight-aguada {
background-color: #020202 !important;
color: #e36c09 !important;
}
.tablepress-stat .highlight-aguadilla {
background-color: #eeee00 !important;
color: #000080 !important;
}
.tablepress-stat .highlight-aguas-buenas {
background-color: #000000 !important;
color: #ff0000 !important;
}
.tablepress-stat .highlight-aibonito {
background-color: #003f7a !important;
color: #ff8c00 !important;
}
.tablepress-stat .highlight-añasco {
background-color: #a30000 !important;
color: #ffd65c !important;
}
.tablepress-stat .highlight-arecibo {
background-color: #c00000 !important;
color: #f7f7f7 !important;
}
.tablepress-stat .highlight-moca {
background-color: #c0c0c0 !important;
color: #800040 !important;
}
Hi,
thanks for the link!
It looks like you’ll have to make a modification to the tablepress-cell-highlighting.php PHP file. In line 215, please change
sanitize_title_with_dashes
to
sanitize_html_class
After that, the correct CSS should be
.tablepress-stat .highlight-aasco {
background-color: #a30000 !important;
color: #ffd65c !important;
}
(Thus, the ñ simply gets removed from the CSS class.)
Regards,
Tobias
Got it. Just to make sure: would doing that also work for the other special characters (á/é/í/ó/ú/ü)?
So, for example, Canóvanas will look like .highlight-canvanas?
Hi,
yes, that’s what should happen 🙂 If it’s not working, you could check the HTML source of the page (“View Source” in the browser) and search for highlight- and then find the one that looks like the highlight word 🙂
Regards,
Tobias
Having now tried it, and done a couple tweaks (I had to also remove spaces as a character) it works now! Thank you for the help.
Hi,
no problem, you are very welcome! 🙂 Good to hear that this helped!
Best wishes,
Tobias