Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#9059 closed Bug (invalid)

A better way to protect source in htmldataprocessor

Reported by: yiminghe Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: Cc:

Description

Current way of using regexp to protectSource/unprotectSource/protectRealComments/unprotectRealComments is not so good and hard to maintain, it's better using html parser to achieve the same objective.

Please review my code attachment.

Attachments (1)

protect_source.patch (7.1 KB) - added by yiminghe 12 years ago.
code patch for htmldataprocessor

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by yiminghe

Attachment: protect_source.patch added

code patch for htmldataprocessor

comment:1 Changed 12 years ago by Garry Yao

Version: 3.6.4 (SVN - trunk)3.0

Tks for contribution, the patch produces neater code, but what are subjected to be protected, includes not only HTML <script> content, but other non-HTML data as well, e.g. other embedded language, thus the proposed patch breaks protectedSource configuration.

comment:2 Changed 12 years ago by Jakub Ś

Keywords: htmldataprocessor removed
Resolution: invalid
Status: newclosed

Thanks for the review @garry.yao. If this patch is breaking protectedSource I have to close this ticket as invalid. Sorry @yiminghe and thank you for contribution.

comment:3 Changed 12 years ago by yiminghe

@garry.yao

Sorry, I missed that configuration, though it seems weird to me to write server code in editor.

@j.swiderski

It's ok, you can close, maybe someday i will come up a more better way. :)

comment:3 Changed 12 years ago by yiminghe

@garry.yao

Sorry, I missed that configuration, though it seems weird to me to write server code in editor.

@j.swiderski

It's ok, maybe someday i will come up a more better way. :)

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy