I am trying generate HTML code using the code below(pastie link),expected output is shown below ,am getting an output where the CR value is getting added twice and also the http links are not right...can anyone help review the logic to see where I am going wrong
My code:-
http://pastie.org/5391102
INput is below
http://pastie.org/5390316(if you copy/paste ,make sure they are tab seperated,otherwise you will get a key error)
Expected output:-
<table cellspacing="1" cellpadding="1" border="1">
<tr>
<th bgcolor="#67B0F9" scope="col">CR</th>
<th bgcolor="#67B0F9" scope="col">FA</th>
<th bgcolor="#67B0F9" scope="col">CL</th>
<th bgcolor="#67B0F9" scope="col">Title</th>
</tr>
<tr>
<td><a href="http://prism/CR/409452">409452</a></td>
<td>WLAN</td>
<td>656885</td>
<td>Age out RSSI values from buffer </td>
</tr>
<tr>
<td><a href=http://data/409452>409452</a>,<a href=http://data/12345>12345</a></td>
<td></td>
<td></td>
<td>To Record HAL and SLM FW Event Logging</td>
</tr>
</table>
My current output:
<table cellspacing="1" cellpadding="1" border="1">
<tr>
<th bgcolor="#67B0F9" scope="col">CR</th>
<th bgcolor="#67B0F9" scope="col">FA</th>
<th bgcolor="#67B0F9" scope="col">CL</th>
<th bgcolor="#67B0F9" scope="col">Title</th>
</tr>
<tr>
<td><a href="http://prism/CR/409452">409452</a></td>
<td><a href="http://prism/CR/409452">409452</a></td>
<td><a href=http://prism/CR/Title>Title</a></td>
<td>wlan</td>
<td>656885</td>
<td>Age out rssi values from buffer</td>
</tr>
<tr>
<td><a href="http://prism/CR/409452, 12345">409452, 12345</a></td>
<td><a href="http://prism/CR/409452, 12345">409452, 12345</a></td>
<td><a href=http://prism/CR/Title>Title</a></td>
<td></td>
<td></td>
<td>To Record HAL and SLM FW Event Logging</td>
</tr>
</table>