issue with bookmarking

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
leona200
Posts: 1
Joined: Wed Jul 25, 2018 8:13 pm

issue with bookmarking

Post by leona200 »

<r>Script URL: <URL url="http://ocms-support.ca/admin/manage_kno ... <LINK_TEXT text="http://ocms-support.ca/admin/manage_kno ... cle&id=154">http://ocms-support.ca/admin/manage_kno ... </URL><br/>
Version of script: 2.7.5<br/>
Hosting company: HESK / OCASI<br/>
URL of phpinfo.php: <br/>
URL of session_test.php: <URL url="http://ocms-support.ca/knowledgebase.ph ... </URL><br/>
What terms did you try when SEARCHING for a solution: <br/>
Looked at w3school, and other html sites along with checking google for missing code after saving<br/>
<br/>
Write your message below:<br/>
<br/>
I have added bookmark links to move around the page before, on our site with no issues see this link:<br/>
<URL url="http://ocms-support.ca/knowledgebase.ph ... <LINK_TEXT text="http://ocms-support.ca/knowledgebase.ph ... ectservice">http://ocms-support.ca/knowledgebase.ph ... </URL><br/>
<br/>
However when I try to do the same thing to this link:<br/>
<URL url="http://ocms-support.ca/knowledgebase.ph ... </URL><br/>
<br/>
I enter the code: Does not matter how I enter it<br/>
<br/>
<a id="client"></a><br/>
<h2 id="client" client Information><br/>
<br/>
or <p><a href="#C4"><br/>
<h2 id="C4"><br/>
<br/>
Once I save this and go to look at the created page it does not work, so I go back to the page to find out part that the references have been removed.<br/>
<br/>
I also tried to create a whole new page and same issue.<br/>
<br/>
Any ideas?</r>
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: issue with bookmarking

Post by Klemen »

Please don't post your message as HTML in the future, took me a while to figure out what's written.

The issue is HTMLPurifier (a third party sanitation library Hesk uses) removes name and id tags by default.

To change this behavior:

1. backup existing files
2. open inc/htmlpurifier/HeskHTMLPurifier.php in a powerful text editor, such as Notepad++
3. find this code:

Code: Select all

$config = HTMLPurifier_Config::createDefault();
Just BELOW that add

Code: Select all

$config->set('Attr.EnableID', true);
4. save, upload and test
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply