Updating Task Description via API (powershell) not rendering correctly

Updating Task Description via API (powershell) not rendering correctly

I've written (in powershell) a script to update child tasks based on parent request fields. The problem I've come across that I can't seem to work around is that the task description, once re-written/updated, doesn't preserve line breaks. An example task description (before update) is:
This is a test description to test what happens when we replace it. Created by: --CreatedBy--

https://rand

Requester: --requester--

When I get done updating through api, the description becomes:
This is a test description to test what happens when we replace it. Created by: Jay Childers<br /><br /> https://rand<br /><br />Requester: Todd Craig

I'm 99% sure it's because I have to submit the api request in powershell with:

$UpdateTaskHeader = @{TECHNICIAN_KEY=$($apikey)}
$UpdateTaskBody =@{INPUT_DATA=$JsonTemplate}
$UpdateTaskResponse = Invoke-RestMethod -Uri $UpdateTaskUrl -Method PUT -Body $UpdateTaskBody -Headers $UpdateTaskHeader -ContentType "application/x-www-form-urlencoded"

Without the -ContentType, the task doesn't get updated. But with the -ContentType, it renders the whole string incorrectly.

Does anybody have a workaround for this?

                  New to ADSelfService Plus?