Maroof Mandal
Maroof Mandal

Reputation: 531

How to make add break after paragraph in WhatsApp share on websites?

I am trying to give the following output with Share on WhatsApp from a website:

This is a sentence. 
This is another sentence.

with the following code:

<a href="whatsapp://send?text=This is a sentence. 
This is another sentence." data-action="share/whatsapp/share">Share on WhatsApp</a>

But it gives output as:

This is a sentence. This is another sentence.

How do I get it?

Upvotes: 3

Views: 7041

Answers (1)

Avalanche
Avalanche

Reputation: 1548

Try encoding your string. The character that you are probably looking for is LF line feed, which corresponds to %0A. Maybe something like this:

This%20is%20a%20sentence.%0AThis%20is%20another%20sentence.

Upvotes: 7

Related Questions