Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

178
Visualizações
Why this script doesn't recognize the ► symbol and is it possible to solve it?

I use this code to display the Top Commentators in my blog: http://yabtb.blogspot.com/2012/05/top-commenters-gadget-with-avatars.html and we have the option to exclude some names.

The problem I'm facing now and I have been searching for a solution or a at least an answer or clue on how to solve it, is that some name with wierd/special symbols are not recognized by the script to be excluded.

Here is the part where we insert the names and an example of one (the last one), that I can't exclude:

var excludeUsers = ["Anonymous","Anónimo","Unknown","joão amarelado","► JUCA ELE ◄"];     // exclude these usernames

All names I've placed so far have worked great and unfortunatly, I don't think asking the code creator for help is an option anymore so my last hope is if someone here more savvy at coding can help.

I've tried to convert the name, escape the symbols and have tried some jquery scripts to see if the name is recognized with .text() or html() and it is...

I'm thinking that can be something on the part that read the feed:

var authorUri = "";
    if(entry.author[0].uri && entry.author[0].uri.$t != "")
      authorUri = entry.author[0].uri.$t;

    if(excludeMe && authorUri != "" && authorUri == urlMyProfile)
      continue;
    var authorName = entry.author[0].name.$t;
    if(excludeUsers.indexOf(authorName) != -1)
      continue;

    var hash=entry.author[0].name.$t + "-" + authorUri;
    if(topcommenters[hash])
      topcommenters[hash].count++;
    else {
      var commenter = new Object();
      commenter.author = entry.author[0];
      commenter.count = 1;
      topcommenters[hash] = commenter;
    }

But my knowledge is not that much to see what can be the issue.

Thank you for any help possible.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You mentioned you tried escaping the characters, but what syntax did you use?

I would say to do it like this:

var excludeUsers = ["Anonymous","Anónimo","Unknown","joão amarelado","\u25ba JUCA ELE \u25c4"];
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda