Problems with htmLAWED - PLEASE HELP!

General discussions related to php

Moderators: macek, egami, gesf

kushal275
New php-forum User
New php-forum User
Posts: 1
Joined: Mon Jun 24, 2013 11:22 pm

Problems with htmLAWED - PLEASE HELP!

Postby kushal275 » Mon Jun 24, 2013 11:43 pm

Hi guys, i am not a coder , but know some basics, i am using elgg(opensource social network) in my project work, i am facing some problem, please help guys, elgg usess htmLAWED for security reason, so dont want to disable it, but want to modify it, i want to allow only table tags and its class, please go through the below example/problem i am facing,



In editor i pasted this code and saved it.



INPUT CODE :

Code: Select all

 <table class="ttmarkcust"  width="499" height="233" border="0" >
  <tr>
    <td class="tttimage" width="266" rowspan="2"><img src="#" width="243" height="100" /></td>
    <td class="tttprice" width="110" height="60">Rs.999/-</td>
    <td class="tttdiscount" width="101">75% OFF!</td>
  </tr>
  <tr>
    <td class="tttcoupons" height="66" colspan="2">SUPERHOTDEAL</td>
  </tr>
  <tr>
    <td class="tttvo"> <a href="#"><img src="#" width="150" height="42" /></a></td>
    <td class="tttbn" colspan="2"><a href="#"><img src="#" width="150" height="42" /></a> <br /></td>
  </tr>
 
 
</table>


When i click the post again and clicked Edit then SHOW SOURCE in editor i am seeing these codes: its filtering the code

OUTPUT CODE:

Code: Select all

 <table width="499" border="0">
  <tr>
    <td width="266" rowspan="2"><img src="#" width="243" height="100" alt="image"></td>
    <td width="110" height="60">Rs.999/-</td>
    <td width="101">75% OFF!</td>
  </tr>
  <tr>
    <td height="66" colspan="2">SUPERHOTDEAL</td>
  </tr>
  <tr>
    <td> <a href="#"><img src="#" width="150" height="42" alt="image"></a></td>
    <td colspan="2"><a href="#"><img src="#" width="150" height="42" alt="image"></a> <br></td>
  </tr>
 
 
</table>


this is the htmLAWED file: https://github.com/Elgg/Elgg/blob/maste ... mLawed.php





please help guys, i dont want filter to table and its classes, please help!



Thank you

User avatar
Strider64
New php-forum User
New php-forum User
Posts: 78
Joined: Sat Mar 23, 2013 8:24 am

Re: Problems with htmLAWED - PLEASE HELP!

Postby Strider64 » Tue Jun 25, 2013 3:05 am

First of all you didn't show any php code, for that is strictly html being shown.

Secondly, you are not going to find many people clicking on that link, I know I didn't. Besides 99.9 percent of the people who program know what htmLawed is.

Lastly, if I had to guess I would say that isn't your problem.

celinsmith111
New php-forum User
New php-forum User
Posts: 4
Joined: Fri Jun 14, 2013 12:52 am
Location: USA
Contact:

Re: Problems with htmLAWED - PLEASE HELP!

Postby celinsmith111 » Tue Jun 25, 2013 3:16 am

Please mention your code by which you add elgg, problem get solved by using some function.


Return to “PHP General”

Who is online

Users browsing this forum: No registered users and 1 guest