Opened 16 years ago
Closed 16 years ago
#2673 closed Bug (invalid)
Pipe Symbol i.e | is converted to %7c
Reported by: | Gerald.J | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description
Steps to reproduce:
Create a html file with a href link in that file. for eg:
<a href="http://forum.textpattern.com?f=Hi|hello">Gerald</a>
Paste the above link in a notepad and save that file with extension .html
Open the html file in any browser, press CTRL+A, The content will be copied.
Paste the content in your FCKeditor.
Switch to Source view and see that, the pipe symbol which is in between Hi and hello in the href link gets converted to %7C
Attachments (1)
Change History (8)
comment:1 Changed 16 years ago by
Component: | Server : Java → General |
---|
comment:2 follow-up: 5 Changed 16 years ago by
Priority: | High → Normal |
---|
comment:3 Changed 16 years ago by
This bahavior seems to be correct.
I wrote a sample code:
package foo; import java.net.URI; import java.net.URISyntaxException; public class Tswt { public static void main(String[] args) { try { URI uri = new URI(null, "http://forum.textpattern.com/?f=Hi|hello", null); System.out.println(uri.toASCIIString()); } catch (URISyntaxException e) { } } }
The sysout gave me:
http://forum.textpattern.com/?f=Hi%7Chello
This one gives me the same result: http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_encodeURI
Does not seem as a bug to me.
comment:4 Changed 16 years ago by
Hi
Copy the link http://forum.textpattern.com/?f=Hi|hello and paste it in your Demo FCK editor and switch to see the source code the | symbol will not be changed to %7C.
Same way, Open the html file in any browser which i have attached in this thread (File contains an anchor link). Copy the contents by pressing CTRL+A and paste it your Demo FCK editor and switch to see the source code now the | symbol gets changed to %7C.
Also, when you have opened the html file in browser, place your mouse pointer over the link and see the status bar the URL behind the link will be shown without any change but when u copy the content and place it in the editor | gets changed.
So, I presume editor is changing the symbol and further, if its happening through java coding i can very well replace it via some means.
Expecting any suggestions and ideas for the above issue.
Thanks in advance.
comment:5 Changed 16 years ago by
Hi
Copy the link http://forum.textpattern.com/?f=Hi|hello and paste it in your Demo FCK editor and switch to see the source code the | symbol will not be changed to %7C.
Same way, Open the html file in any browser which i have attached in this thread (File contains an anchor link). Copy the contents by pressing CTRL+A and paste it your Demo FCK editor and switch to see the source code now the | symbol gets changed to %7C.
Also, when you have opened the html file in browser, place your mouse pointer over the link and see the status bar the URL behind the link will be shown without any change but when u copy the content and place it in the editor | gets changed.
So, I presume editor is changing the symbol and further, if its happening through java coding i can very well replace it via some means.
Expecting any suggestions and ideas for the above issue.
Thanks in advance.
comment:6 Changed 16 years ago by
ok, this is what I have done:
- Copying
http://forum.textpattern.com/viewtopic.php?f=Hi|hello
in Rich Mode and then switching to Source Mode results in<p><a href="http://forum.textpattern.com/?f=Hi%7Chello" class="ext-link"><span class="icon">http://forum.textpattern.com/?f=Hi|hello</span></a></p>
.
- Copying
<a href="http://forum.textpattern.com/viewtopic.php?f=Hi|hello">FCK</a>
in Source Mode and switching to Rich Mode results inFCK
and the pipe remains untouched in the Source Mode.
The question still remains, do you have a problem with that | is converted to %7C?
JavaScript's encodeURI() acts same as Java. Thus I deduct that both are correct and | has to be converted/escaped.
comment:7 Changed 16 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
I think it is not a bug because:
-Links
<a href="?test=test|test"> test </a> <a href="?test=test%7Ctest"> test </a>
loads the same page: ?test=test|test
- Please type http://www.google.pl/search?q=test%7Ctest in adressbar -> It is changed to test|test by browser (website doesn't matter)
-There is no difference on PHP side
-"|" character is not safe (http://www.ietf.org/rfc/rfc1738.txt)
-Please create link to http://www.google.pl/search?q=test%7Ctest in Open Office or Google Docs, save as HTML, open source code. "|" is changed to "%7C"
I'm a bit confused. URL term is defined in http://www.ietf.org/rfc/rfc1738.txt :
but "|" character passes W3c validation