title: how to prevent "URIError: malformed URI sequence" from style percent
body: <p>Ive this code:  </p>
  
  <blockquote>
    <p>javascript:if(document.getElementById('linky'))%20{%20%20%20%20document.getElementById('linky').value=splitdo;}else%20{tarea=document.createElement('textarea');tarea.style.position='fixed';tarea.style.top='5%';tarea.style.left='5%';tarea.style.width='400px';tarea.style.height='100px';tarea.id='linky';tarea.value=splitdo;document.body.appendChild(tarea);};void(0);</p>
  </blockquote>
  
  <p>I want to decode it using <code>decodeURIComponent</code> function. Now the problem is it is giving me the error <code>URIError: malformed URI sequence</code>.<br>
  I know this problem have been asked many times in this site, but mine is a bit different.<br>
  after some work Ive fount that the problem goes to the line that it has percentage with numbers (i.e. <code>tarea.style.top='5%';tarea.style.left='5%';</code>)<br>
  If you remove the percent, no error will be thrown by that function. I know it is because of the percents followed by nothing, but I dont know how to prevent this error. I want the percents to be there, I dont want to use pixels. What should I do to keep the <code>5%</code> but prevent this error?<br>
  Can it be prevented?</p>