Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Jul 14, 2016 @ 14:17
    Michaël Vanbrabandt
    0

    Add delimiters for the url

    Hi Richard,

    in the SEO Checker you have a preview snippet of the SERP result.

    However the keyword is not set to bold in the url like in the meta description.

    For example:

    Keyword:

    umbraco tutorials

    Url:

    http://www.example.be/umbraco-tutorials/

    This is not set to bold because in your parseText function you haven't added the '-' and '/' delimiters.

    $scope.parseText = function (val) {
            var arr = [];
            var tmp = [];
            var chars = [' ', '\'', '"', ',', '.', ':', ';'];
            for (var i = 0; i < val.length; i++) {
                if (chars.indexOf(val[i]) >= 0) {
                    arr.push(tmp.join(''));
                    arr.push(val[i]);
                    tmp = [];
                } else {
                    tmp.push(val[i]);
                }
            }
            arr.push(tmp.join(''));
            return arr;
        };
    

    After adding these into the array you get the keywords in bold in the url.

    /Michaël

Please Sign in or register to post replies

Write your reply to:

Draft