How do I strip rogue tags:
-
This is a bit of a complicated one but here goes…
I am constructing a fairly complex WordPress Page that has a lot of Theme Shortcodes that need to be applied with care to work right.
The basic content comes from an Excel spreadsheet.
It’s actually easier to add columns to the Excel spreadsheet and enter the shortcodes there than it is to import the source content to WordPress and add them there. To be clear, the content is not tabular.
The problem is that when I copy and paste (as plain text) the Excel content into WordPress, each cell puts a rogue html tag “<br />” into the clipboard
I thought that I would try copying the text in NotePad++ to do a find and replace, but NP++ seems to convert that tag to a tab or something similar and I’m struggling to work out how to do the find and replace. If I enter <br /> NP++ says ‘nothing found’
I’d be grateful for any suggestions please
- Paul
-
It’s because you’ve assumed the “convert” was in NPP, but really it’s in WordPress.
When you copy a selection from Excel and paste into a textual context, every line ends with a newline character (so if you only select one column, every CELL ends with a newline character), and multiple columns are separated by TABs. When you paste that text into WordPress, it appears to be converting the newline into a
<br />
. But when you paste it into NPP, it just interprets it as an end-of-line.I don’t have WordPress convenient right now, but my next debugging steps would be:
- What happens if you paste into NPP, then re-copy from NPP and paste into WordPress?
- What happens if you paste into NPP, then use column-select (alt+drag selection), copy, then paste into WordPress?