Topic: HTML links vanishing

I've noticed that when using the CKeditor, any links done with HTML tags <a></a> are stripped from the short and full news once posted.

Tweaking around with it, I did notice that the links WILL post if done using BBcode [link][/link].

The problem from there is that you cannot open the links in new tabs (or windows) using the standard "_blank".


I have HTML enabled for the CKeditor and all other tags that I've used so far seem to work correctly. But if I use the built-in "Link" function located in the toolbar, the links are given the standard HTML tags and are then stripped.

Other people have had this problem as well, but I can't find any solutions in the forums. Does anyone know what the problem could be?

Re: HTML links vanishing

Did you update CuteNews with the latest GitHub version?

IIRC there was a problem with HTML vanishing and it had been resolved in one of the GitHub updates.

Re: HTML links vanishing

Did you update CuteNews with the latest GitHub version?

IIRC there was a problem with HTML vanishing and it had been resolved in one of the GitHub updates.


I actually did go through and backup all files and then update using what is on github. The links are now working correctly, as is the random bug where long news posts would be cut and stripped when posting. But now my pagination is destroyed. I'm no longer getting the prev/next links and if I view and article and use the "back" link that I placed using a bit of code given by another member:

<div>
[url=java script:history.back(1)]Return to Latest News[/url]
</div>

This bit used to work just fine before I implemented the updates. Now it really messes with the pages. I now lose all CSS from the main page, and regain the pagination, but they don't link to the next pages like they should.

4 (edited by 2014-03-10 13:27:46)

Re: HTML links vanishing

The pagination is missing because you did not migrate your news.

Please refer to this topic https://cutephp.com/forum/index.php?showtopic=44104

Look at Updating CuteNews section and do step 9 and 10.

Re: HTML links vanishing

Thanks! I didn't realize there was an additional thing I had to do. I thought that so long as I copied in the original files for the posts, that it would be fine.

I'll work on it today and see what happens. I realized also, over the weekend, that I didn't copy over every file from github. Just the files that changed earlier than 3 months ago. I'll go through and update each one to make sure I didn't miss anything before the migration.

6 (edited by 2014-03-11 14:05:46)

Re: HTML links vanishing

Went through and updated every file via github, then ran the script for the migration. Everything is working now.

For anyone interested, the updates and migration fixed the following issues that I was having:


- HTML links we being stripped from news (anything using <a></a>)
- Long articles were getting stripped down to nothing.
- Pagination disappeared from main news, and other pages were losing CSS from main site.
- installation of CkFinder now works, CkEditor no longer loses it's toolbars.


I am still having a little bit of trouble with creating a "back" button in the full news. The problem comes from after a person hits "back" to return to the main news page you then lose abillity to click any links.

I have tried the following bits of code to create the "back button" within the full news, and all with the same results. They work, but with loss of link functionality.

[url=java script:history.go(-1)]Return to Latest Press[/url]

<Form><input value="Return to Latest Press" onClick="history.go(-1);return true;"> </form>

<button onclick="history.go(-1);"> Return to Latest Press </button>

For this I made sure that the script was located in the main news.php file:

<script>
function goBack()
  {
  window.history.back()
  }
</script>

<body>
<button onclick="goBack()">Go Back</button>
</body>

Not sure why it's losing the ability to click on links after you hit "back". Refreshing does fix it, but that's not an idea solution.

Anyone have any ideas?

Re: HTML links vanishing

I do not know there is such a problem. I will give it a try this weekend and see if I get the same result as you.

Re: HTML links vanishing

It is a really strange bug. It wasn't there before updating, but is now.

I've also noticed one other thing. When copy/pasting old news files over from N13News, for some reason the Ckeditor is adding in tons of non-breaking spaces ( ). From what I can see, it's adding the   in between every single word in the post.

To make sure that it wasn't the original code in the posts, I copied and pasted into dreamweaver (DW) to check. The original HTML is perfectly clean and minimal. Nothing more than <p></p> and links. Some
. So it must be something with Ckeditor adding in the junk code.

Normally I'd probably just ignore it, but thanks to the extra code, it's forcing both short and long news to break from their div tags. Not good.

So far the only "fix" I could find was to have both news open at once, copy straight from the ckeditor source view from one, into the ckeditor source view of the other and not hit "post" or "edit" until I was finished. Then I can't go back to edit it again, or it would toss in the junk code.

Re: HTML links vanishing

Not sure why it's losing the ability to click on links after you hit "back". Refreshing does fix it, but that's not an idea solution.

Anyone have any ideas?

I didn't use any of your codes, however I did use this,

[url=#]Go Back[/url]

Using that still allows me to click on the links. Hope it helps.

Re: HTML links vanishing

I tired using the code you provided:

[url=#]Go Back[/url]

Unfortunately this didn't work for me at all. It was just remaining on the same page and not going back.

While looking it over, I decided that my best bet, was just to place a link to the actual location of the main news at the bottom of the full news template. It will just take the person back to the first page of the news, and not back to whatever page they might have been on... but it's a temporary fix for now.

I'm still curious as to why I can't get this to work correctly though.