Questions tagged [canonicalization]

is a process for converting data that has more than one possible representation into a "standard", "normal", or canonical form.

As per Wikipedia:

In computer science, canonicalization (abbreviated c14n, where 14 represents the number of letters between the C and the N; also sometimes standardization or normalization) is a process for converting data that has more than one possible representation into a "standard", "normal", or canonical form. This can be done to compare different representations for equivalence, to count the number of distinct data structures, to improve the efficiency of various algorithms by eliminating repeated calculations, or to make it possible to impose a meaningful sorting order.

197 questions
2
votes
1 answer

Canonicalize() function converts chars to white space

I am using EncodeForHTML() to prevent Cross Site Scripting (XSS) attacks. In doing so, some text field as : step 1: cost too much to keep. #3 bad business decision is stored in the database as : step 2: cost too much to keep.…
CFNinja
  • 3,571
  • 4
  • 38
  • 59
2
votes
1 answer

DKIM verification and canonicalization of leading double dots

Just wondering how can I properly verify my DKIM signature? Especially using popular service like Gmail, Yahoo Mail or Hotmail (if it supports DKIM)? Also, when transfer email as quoted printable in SMTP, the leading dot is converted to two, would…
ccppjava
  • 2,595
  • 3
  • 24
  • 30
2
votes
0 answers

XML signature canonicalization by XSLT

I am trying to make my own program for canonicalization XML c14n in XSLT. While searching I find examples in Java, C and Python. I am newbie in XSLT and I want to understand if there are any conditions in canonicalization which cannot be made by…
2
votes
0 answers

Using Canonical for Duplicate Content with friendly urls

I have a rails app and in the app we are using 2 locale variables, :en & :fr In the help section we have articles written in both language as; ...en/help/articles/5-booking-process #Content EN ...fr/help/articles/5-Processus-de-reservation #Content…
Shalafister's
  • 761
  • 1
  • 7
  • 34
2
votes
2 answers

Canonical XML: whitespace in element-only container?

I have a simple XML file with an XSD schema, where some elements are allowed to contain only certain elements, e.g.
2
votes
5 answers

How to simplify CSS code

I am working with an existing piece of CSS code that looks like this (excerpted from a much larger body of code): .apl_widget_fourLevel { margin:0 auto 1em; overflow:hidden; /* zoom:1 */ /* IE Sheet */ } /* a panel container…
hughdbrown
  • 47,733
  • 20
  • 85
  • 108
2
votes
1 answer

how to generate canonical tag dynamically in jsp

Need to add canonical tag in jsp But i dont want to hard code the url value. How can i achieve this. I have tried using data binding techniques but in view source, link tag is shown as
2
votes
1 answer

Uri canonicalization compacting FTP scheme

https://msdn.microsoft.com/en-us/library/system.uri(v=vs.110).aspx According to the reference above, when specifying an ftp url, the uri class should not compact the url. For example, the following ftp url: Uri uri = new…
Michael
  • 434
  • 1
  • 5
  • 12
2
votes
1 answer

Can a rel=canonical meta tag point to a 301 redirect URL?

I'm working on a project which has versioned URLs. I want the rel=canonical meta tag to always point to the latest version, and this can always be reached via a 301 redirect. Here are the URLs: /example 301 redirect to /example/3 /example/1
2
votes
2 answers

ESAPI canonicalize malforming url

We have an application that accepts URLs from users. This data needs validation, and we're using ESAPI for this purpose. However, we're struggling with URLs containing ampersands. The problem appears when ESAPI canonicalizes the data before…
user2754648
  • 25
  • 1
  • 4
2
votes
1 answer

canonicalization XML in c++

I'm looking for the simplest way to canonicalize part of XML document in C++. Best option for me will be small library (I'm not c++ master) which I can simple add to my project. If there is no such way and I have to create canonicalized part mysefl,…
rzysia
  • 737
  • 1
  • 11
  • 26
2
votes
2 answers

CAT.NET "Sanitize the file path prior to passing it to file system routines" message

I'm analyzing my code (C#, desktop application) with CAT.NET Code Analysis and getting "Sanitize the file path prior to passing it to file system routines" message when dealing with file names. What I don't understand is that to ensure the file name…
Arseni Mourzenko
  • 50,338
  • 35
  • 112
  • 199
2
votes
2 answers

Compare URIs for a search bot?

For a search bot, I am working on a design to: * compare URIs and * determine which URIs are really the same page Dealing with redirects and aliases: Case 1: Redirects Case 2: Aliases e.g. www Case 3: URL parameters e.g.…
Santosh
  • 21
  • 2
2
votes
3 answers

XOM canonicalization takes too long

I have an XML file that can be as big as 1GB. I am using XOM to avoid OutOfMemory Exceptions. I need to canonicalize the entire document, but the canonicalization takes a long time, even for a 1.5 MB file. Here is what I have done: I have this…
artsince
  • 1,022
  • 20
  • 36
2
votes
1 answer

How to decide on class of object to be created from algorithm URI

Because of specifications imposed on me I have written my own C# code to sign XML, and to validate signed XML. Much like the SignedXml class does, but this way I'm more flexible e.g. in using XML namespace prefixes or not (it seems SignedXml does…