Developer Area

Other apps (#13) - New lines in keywords (#186) - Message List

New lines in keywords

Hi Guys,

I'm having a problem with the newlines in keywords. The textarea is encoded with utf8_encode() (PHP) but it's not passing through new lines in the keywords?

Here is some sample code:

$freetext = $client->new_keyword('ft', utf8_encode($keywords), NULL); // Build keywords
$client->searchData->keyword[] = $freetext; // Store the keyword array
$client->set_search_data($subfqdn, $client->searchData, TRUE); // Store the TXT records

Any ideas?



  • Message #538

    Thank you for this report. I now have a confirmation from our developers that in the current implementation, keywords don't support carriage returns because a keyword value is defined as a "token" in XSD, which causes all whitespace sequences being collapsed into single spaces.

    This will be rectified in the next release of the software when the definition is changed to "string", which preserves whitespace (if properly encoded, see below).

    <soap:Envelope xmlns:soap=""
           <typ:setSearchDataRequest domainName="">
                 <typ:keyword field="ft"

    Note that it's not sufficient to simply type returns into the SOAP request; these will disappear due to the usual XML attibute value normalization (

    • Message #539

      Thanks for that...

      So, would it work to exchange a carriage return for a &#x0a; using string replacement with PHP, then to encode the lot with UTF-8? Or have I not understood properly?

      This seems to be the only thing now not working with keywords, everything else seems fine which is good :)



      • Message #540

        Yep, that should work nicely.

        • Message #541

          Excellent, thanks

Search This Site
Main site | WHOIS | Sell .tel | FAQ | Archived Site | About Telnic | Contact Us